code: def get_rules(self, description=None):
          '''
          Returns a list of extraction rules that match a given description.
  
          @description - The description to match against.
  
          Returns a list of extraction rules that match the given description.
          If no description is provided, a list of all rules are returned.
          '''
          if description:
              rules = []
              description = description.lower()
              for i in range(0, len(self.extract_rules)):
                  if self.extract_rules[i]['regex'].search(description):
                      rules.append(self.extract_rules[i])
          else:
              rules = self.extract_rules
  
          return rulef get_rules(self, description=None):
          '''
          Returns a list of extraction rules that match a given description.
  
          @description - The description to match against.
  
          Returns a list of extraction rules that match the given description.
          If no description is provided, a list of all rules are returned.
          '''
          if description:
              rules = []
              description = description.lower()
              for i in range(0, len(self.extract_rules)):
                  if self.extract_rules[i]['regex'].search(description):
                      rules.append(self.extract_rules[i])
          else:
              rules = self.extract_rules
  
          return rules
docs: Returns a list of extraction rules that match a given description.
  
          @description - The description to match against.
  
          Returns a list of extraction rules that match the given description.
          If no description is provided, a list of all rules are returned.