Human: Can you show me a Python program to makedir if necessary. Assistant: 
Here is a Python program to makedir if necessary

import os

def makedir(path):
    """
    Ensures that the path exists and is a directory.
    :param path: path to be created
    :return:
    """
    if not os.path.exists(path):
        os.makedirs(path)

# Enter the path
path = "C:\\Users\\carnation\\Desktop\\python_exercises\\relative_path"

# Calling the function
print((makedir(path)))

#Example Output
# None

#Remember to inspect code for bugs.