code: def for_entity(obj, check_support_attachments=False):
      
      if check_support_attachments and not supports_attachments(obj):
          return []
  
      return getattr(obj, ATTRIBUTE)
docs: Return attachments on an entity.