nodes: 0, module; 1, function_definition; 2, function_name:unique_identities; 3, parameters; 4, block; 5, identifier:cls; 6, identifier:sh_db; 7, expression_statement; 8, try_statement; 9, comment:"""List the unique identities available in SortingHat.
  
          :param sh_db: SortingHat database
          """; 10, block; 11, except_clause; 12, for_statement; 13, as_pattern; 14, block; 15, identifier:unique_identity; 16, call; 17, block; 18, identifier:Exception; 19, as_pattern_target; 20, expression_statement; 21, attribute; 22, argument_list; 23, expression_statement; 24, identifier:e; 25, call; 26, identifier:api; 27, identifier:unique_identities; 28, identifier:sh_db; 29, yield; 30, attribute; 31, argument_list; 32, identifier:unique_identity; 33, identifier:logger; 34, identifier:debug; 35, string:"Unique identities not returned from SortingHat due to %s"; 36, call; 37, identifier:str; 38, argument_list; 39, identifier:e
code: def unique_identities(cls, sh_db):
          """List the unique identities available in SortingHat.
  
          :param sh_db: SortingHat database
          """
          try:
              for unique_identity in api.unique_identities(sh_db):
                  yield unique_identity
          except Exception as e:
              logger.debug("Unique identities not returned from SortingHat due to %s", str(e))