code: def applies_to (self, useragent):
          
          if not useragent:
              return True
          useragent = useragent.lower()
          for agent in self.useragents:
              if agent == '*':
                  # we have the catch-all agent
                  return True
              if agent.lower() in useragent:
                  return True
          return False
docs: Check if this entry applies to the specified agent.
  
          @return: True if this entry applies to the agent, else False.
          @rtype: bool