def METHOD_NAME(self, url=None):
    if url is None:
        url = self._resolve_url()
    else:
        if not validators.url(url):
            raise InvalidUrlError(url)
    data = {"hosted": True, "url": url}
    self.logger.debug(
        "Registering model {0} in the file system".format(self.model_id)
    )
    path = os.path.join(EOS, "dest", self.model_id)
    self.logger.debug(path)
    if os.path.exists(path):
        shutil.rmtree(path)
    os.mkdir(path)
    file_name = os.path.join(path, IS_FETCHED_FROM_HOSTED_FILE)
    self.logger.debug(file_name)
    with open(file_name, "w") as f:
        json.dump(data, f)
    current_time = datetime.datetime.now()
    folder_name = current_time.strftime("%Y%m%d%H%M%S")
    path = os.path.join(EOS, "repository", self.model_id)
    if os.path.exists(path):
        shutil.rmtree(path)
    path = os.path.join(path, folder_name)
    os.makedirs(path)
    file_name = os.path.join(path, IS_FETCHED_FROM_HOSTED_FILE)
    with open(file_name, "w") as f:
        json.dump(data, f)
    file_name = os.path.join(path, SERVICE_CLASS_FILE)
    self.logger.debug("Writing service class hosted {0}".format(file_name))
    with open(file_name, "w") as f:
        f.write("hosted")