def load_resource(resource_url: str, forceupdate: bool = False):
log.info(f"<STR_LIT>")<EOL>try:<EOL><INDENT>fo = bel.utils.download_file(resource_url)<EOL>if not fo:<EOL><INDENT>log.error(f"<STR_LIT>")<EOL>return "<STR_LIT>"<EOL><DEDENT>fo.seek(<NUM_LIT:0>)<EOL>with gzip.open(fo, "<STR_LIT>") as f:<EOL><INDENT>metadata = json.loads(f.__next__())<EOL><DEDENT>if "<STR_LIT>" not in metadata:<EOL><INDENT>log.error(f"<STR_LIT>")<EOL>return "<STR_LIT>"<EOL><DEDENT>if metadata["<STR_LIT>"]["<STR_LIT:type>"] == "<STR_LIT>":<EOL><INDENT>bel.resources.namespace.load_terms(fo, metadata, forceupdate)<EOL><DEDENT>elif metadata["<STR_LIT>"]["<STR_LIT:type>"] == "<STR_LIT>":<EOL><INDENT>bel.resources.ortholog.load_orthologs(fo, metadata)<EOL><DEDENT><DEDENT>finally:<EOL><INDENT>fo.close()<EOL><DEDENT>
Load BEL Resource file

    Forceupdate will create a new index in Elasticsearch regardless of whether
    an index with the resource version already exists.

    Args:
        resource_url: URL from which to download the resource to load into the BEL API
        forceupdate: force full update - e.g. don't leave Elasticsearch indexes alone if their version ID matches