def expand_curielike(namespaces, curie):
if curie == '<STR_LIT>':<EOL><INDENT>return None<EOL><DEDENT>if sys.version < '<STR_LIT:3>' and not isinstance(curie, type(u'<STR_LIT>')):<EOL><INDENT>curie = curie.decode('<STR_LIT>')  <EOL><DEDENT>if curie.startswith('<STR_LIT:[>') and curie.endswith('<STR_LIT:]>'):<EOL><INDENT>curie = curie[<NUM_LIT:1>:-<NUM_LIT:1>]<EOL><DEDENT>if '<STR_LIT::>' in curie:<EOL><INDENT>ns, localpart = curie.split('<STR_LIT::>', <NUM_LIT:1>)<EOL><DEDENT>elif '<STR_LIT:.>' in curie:<EOL><INDENT>ns, localpart = curie.split('<STR_LIT:.>', <NUM_LIT:1>)<EOL><DEDENT>else:<EOL><INDENT>return curie<EOL><DEDENT>if ns in namespaces:<EOL><INDENT>return URIRef(namespaces[ns].term(localpart))<EOL><DEDENT>else:<EOL><INDENT>logging.warning("<STR_LIT>", ns)<EOL>return URIRef(curie)<EOL><DEDENT>
Expand a CURIE (or a CURIE-like string with a period instead of colon
    as separator) into URIRef. If the provided curie is not a CURIE, return it
    unchanged.