<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_object(self, file_path):
 """Remove an existing file or directory. Args: file_path: The path to the file relative to self. Raises: IOError: if file_path does not correspond to an existing file, or if part of the path refers to something other than a directory. OSError: if the directory is in use (eg, if it is '/'). """

        file_path = self.absnormpath(self._original_path(file_path))
        if self._is_root_path(file_path):
            self.raise_os_error(errno.EBUSY, file_path)
        try:
            dirname, basename = self.splitpath(file_path)
            target_directory = self.resolve(dirname)
            target_directory.remove_entry(basename)
        except KeyError:
            self.raise_io_error(errno.ENOENT, file_path)
        except AttributeError:
            self.raise_io_error(errno.ENOTDIR, file_path)