human
Write me a Python code to check if a folder exists and create otherwise.
assistant
Here is a Python code to check if a folder exists and create otherwise

import os

def check_folder(path):
    """
    >>> check_folder('/home/rosey/Desktop/')
    True
    >>> check_folder('/home/rosey/Desktop/')
    False
    """
    if not os.path.exists(path):
        os.makedirs(path)
    return os.path.exists(path)

# Enter the path
path = '/home/rosey/Desktop/'

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

#Example Output
# True

#Remember to inspect code for bugs.