human
Can you show me a Python function to check if a path is writeable.
assistant
Here is a Python function to check if a path is writeable

import os

def is_writeable(path):
    """
    Check if a path is writeable.
    """
    try:
        os.access(path, os.W_OK)
        return True
    except:
        return False

# Enter the path
path = "/home/rosey/Desktop/test.txt"

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

#Example Output
# True

#Remember to inspect code for bugs.