docs: def get_attribute_id(self, attribute_key):
      """ Get attribute ID for the provided attribute key.
  
      Args:
        attribute_key: Attribute key for which attribute is to be fetched.
  
      Returns:
        Attribute ID corresponding to the provided attribute key.
      """
  
      attribute = self.attribute_key_map.get(attribute_key)
      has_reserved_prefix = attribute_key.startswith(RESERVED_ATTRIBUTE_PREFIX)
  
      if attribute:
        if has_reserved_prefix:
          self.logger.warning(('Attribute %s unexpectedly has reserved prefix %s; using attribute ID '
                               'instead of reserved attribute name.' % (attribute_key, RESERVED_ATTRIBUTE_PREFIX)))
  
        return attribute.id
  
      if has_reserved_prefix:
        return attribute_key
  
      self.logger.error('Attribute "%s" is not in datafile.' % attribute_key)
      self.error_handler.handle_error(exceptions.InvalidAttributeException(enums.Errors.INVALID_ATTRIBUTE_ERROR))
      return None