<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def remove(path, dir_fd=None):
 """ Remove a file. Equivalent to "os.remove" and "os.unlink". Args: path (path-like object):
 Path or URL. dir_fd: directory descriptors; see the os.remove() description for how it is interpreted. Not supported on cloud storage objects. """

    system = get_instance(path)

    # Only support files
    if system.is_locator(path) or path[-1] == '/':
        raise is_a_directory_error("Is a directory: '%s'" % path)

    # Remove
    system.remove(path)