def METHOD_NAME(self, key):
    path = Path(key)
    if self.use_blob_urls:
        # include self-hosted links pointed to local resources via
        # {settings.HOSTNAME}/data/local-files?d=<path/to/local/dir>
        document_root = Path(settings.LOCAL_FILES_DOCUMENT_ROOT)
        relative_path = str(path.relative_to(document_root))
        return {settings.DATA_UNDEFINED_NAME: f'{settings.HOSTNAME}/data/local-files/?d={quote(str(relative_path))}'}
    try:
        with open(path, encoding='utf8') as f:
            value = json.load(f)
    except (UnicodeDecodeError, json.decoder.JSONDecodeError):
        raise ValueError(
            f"Can\'t import JSON-formatted tasks from {key}. If you're trying to import binary objects, "
            f"perhaps you've forgot to enable \"Treat every bucket object as a source file\" option?")
    if not isinstance(value, dict):
        raise ValueError(f"Error on key {key}: For {self.__class__.__name__} your JSON file must be a dictionary with one task.")
    return value