def create_directory(directory):
    """Create parent directories as necessary.

    :param directory: (~str) Path of directory to be made.

    :return: True - if directory is created, and False - if not.
    """
    try:
        os.makedirs(directory)
        return True
    except __HOLE__:
        # Checks if the folder is empty
        if not os.listdir(directory):
            return True
        return False
dataset/ETHPy150Open owtf/owtf/install/install.py/create_directory