nodes: 0, module; 1, function_definition; 2, function_name:infer_namespaces; 3, parameters; 4, block; 5, identifier:ac; 6, expression_statement; 7, return_statement; 8, comment:"""infer possible namespaces of given accession based on syntax
      Always returns a list, possibly empty
  
      >>> infer_namespaces("ENST00000530893.6")
      ['ensembl']
      >>> infer_namespaces("ENST00000530893")
      ['ensembl']
      >>> infer_namespaces("ENSQ00000530893")
      []
      >>> infer_namespaces("NM_01234")
      ['refseq']
      >>> infer_namespaces("NM_01234.5")
      ['refseq']
      >>> infer_namespaces("NQ_01234.5")
      []
      >>> infer_namespaces("A2BC19")
      ['uniprot']
      >>> sorted(infer_namespaces("P12345"))
      ['insdc', 'uniprot']
      >>> infer_namespaces("A0A022YWF9")
      ['uniprot']
  
  
      """; 9, list_comprehension; 10, identifier:v; 11, for_in_clause; 12, if_clause; 13, pattern_list; 14, call; 15, call; 16, identifier:k; 17, identifier:v; 18, attribute; 19, argument_list; 20, attribute; 21, argument_list; 22, identifier:ac_namespace_regexps; 23, identifier:items; 24, identifier:k; 25, identifier:match; 26, identifier:ac
code: def infer_namespaces(ac):
      """infer possible namespaces of given accession based on syntax
      Always returns a list, possibly empty
  
      >>> infer_namespaces("ENST00000530893.6")
      ['ensembl']
      >>> infer_namespaces("ENST00000530893")
      ['ensembl']
      >>> infer_namespaces("ENSQ00000530893")
      []
      >>> infer_namespaces("NM_01234")
      ['refseq']
      >>> infer_namespaces("NM_01234.5")
      ['refseq']
      >>> infer_namespaces("NQ_01234.5")
      []
      >>> infer_namespaces("A2BC19")
      ['uniprot']
      >>> sorted(infer_namespaces("P12345"))
      ['insdc', 'uniprot']
      >>> infer_namespaces("A0A022YWF9")
      ['uniprot']
  
  
      """
      return [v for k, v in ac_namespace_regexps.items() if k.match(ac)]