Human: os check if an item is a directory. Assistant: 
Here is a Python function to check if an item is a directory

import os

def isdir(path):
    """Check if path is a directory."""
    return os.path.isdir(path)

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

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

#Example Output
# True

#Remember to inspect code for bugs.