code: def _eb_env_tags(envs, session_factory, retry):
      
  
      client = local_session(session_factory).client('elasticbeanstalk')
  
      def process_tags(eb_env):
          try:
              eb_env['Tags'] = retry(
                  client.list_tags_for_resource,
                  ResourceArn=eb_env['EnvironmentArn'])['ResourceTags']
          except client.exceptions.ResourceNotFoundException:
              return
          return eb_env
  
      # Handle API rate-limiting, which is a problem for accounts with many
      # EB Environments
      return list(map(process_tags, envs))
docs: Augment ElasticBeanstalk Environments with their tags.