You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: github_team_repository.rb
    path of file: ./repos/geoengineer/lib/geoengineer/resources/github
    
    the code of the file until where you have to start completion: ################################################################################
# GithubTeamRepository is the +github_team_repository+ Terraform resource.
#
# {https://www.terraform.io/docs/providers/github/r/team_repository.html Terraform Docs}
################################################################################
class GeoEngineer::Resources::GithubTeamRepository < GeoEngineer::Resource
  validate -> { validate_required_attributes([:team_id, :repository]) }

  after :initialize, -> { _terraform_id -> { NullObject.maybe(remote_resource)._terraform_id } }
  after :initialize, -> { _geo_id -> { "#{team_id}:#{repository}" } }

  def self._fetch_remote_resources(provider)
    # There is no way to obtain all these resources in bulk in a single request,
    # so we iterate over all teams and fetch their individual repo permissions.
    teams = GithubClient.organization_teams
    
  def self._fetch_remote_resources(provider)
    # There is no way to obtain all these resources in bulk in a single request,
    # so we iterate over all teams and fetch their individual repo permissions.
    teams = GithubClient.organization_teams(provider.organization)

    Parallel.map(teams, { in_threads: Parallel.processor_count }) do |team, team_role|
      repos_for_team(team[:id])
    end.flatten
  end

  def self.repos_for_team(team_id)
    GithubClient.team_repositories(team_id)
                .each do |team_repo|
      team_repo[:_terraform_id] = "#{team_id}:#{team_repo[:name]}"
      team_repo[:_geo_id] = team_repo[:_terraform_id]

      team_repo[:team_id] = team_id
      team_repo[:repository] = team_repo[:name]

      team_repo[:permission] =
        if team_repo[:permissions][:admin]
          'admin'
        elsif team_repo[:permissions][:push]
          'push'
        elsif team_repo[:permissions][:pull]
          'pull'
        end
    end
  end