code: def _get_attributes(self, attributes):
      
  
      params = []
  
      if isinstance(attributes, dict):
        for attribute_key in attributes.keys():
          attribute_value = attributes.get(attribute_key)
          # Omit attribute values that are not supported by the log endpoint.
          if validator.is_attribute_valid(attribute_key, attribute_value):
            attribute_id = self.config.get_attribute_id(attribute_key)
            if attribute_id:
              params.append({
                'entity_id': attribute_id,
                'key': attribute_key,
                'type': self.EventParams.CUSTOM,
                'value': attribute_value
              })
  
      # Append Bot Filtering Attribute
      bot_filtering_value = self._get_bot_filtering()
      if isinstance(bot_filtering_value, bool):
        params.append({
            'entity_id': enums.ControlAttributes.BOT_FILTERING,
            'key': enums.ControlAttributes.BOT_FILTERING,
            'type': self.EventParams.CUSTOM,
            'value': bot_filtering_value
        })
  
      return params
docs: Get attribute(s) information.
  
      Args:
        attributes: Dict representing user attributes and values which need to be recorded.
  
      Returns:
        List consisting of valid attributes for the user. Empty otherwise.