code: def is_protein_or_chemical(agent):
      '''Return True if the agent is a protein/protein family or chemical.'''
      # Default is True if agent is None
      if agent is None:
          return True
      dbs = set(['UP', 'HGNC', 'CHEBI', 'PFAM-DEF', 'IP', 'INDRA', 'PUBCHEM',
                 'CHEMBL'])
      agent_refs = set(agent.db_refs.keys())
      if agent_refs.intersection(dbs):
          return True
      return Falsf is_protein_or_chemical(agent):
      '''Return True if the agent is a protein/protein family or chemical.'''
      # Default is True if agent is None
      if agent is None:
          return True
      dbs = set(['UP', 'HGNC', 'CHEBI', 'PFAM-DEF', 'IP', 'INDRA', 'PUBCHEM',
                 'CHEMBL'])
      agent_refs = set(agent.db_refs.keys())
      if agent_refs.intersection(dbs):
          return True
      return False
docs: Return True if the agent is a protein/protein family or chemical.