<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):
 """ Removes given path. :param path: Path to remove. :type path: unicode :return: Method success. :rtype: bool """


    try:
        if os.path.isfile(path):
            LOGGER.debug("> Removing '{0}' file.".format(path))
            os.remove(path)
        elif os.path.isdir(path):
            LOGGER.debug("> Removing '{0}' directory.".format(path))
            shutil.rmtree(path)
        return True
    except Exception as error:
        raise foundations.exceptions.PathRemoveError(
            "!> {0} | Cannot remove '{1}' path: '{2}'".format(__name__, path, error))