code: def policy_mapping_fn(agent_id, episode, worker, **kwargs):
      # main policy plays against opponent policy.
      return (
          MAIN_POLICY_ID
          if episode.episode_id % 2 == agent_id
          else OPPONENT_POLICY_ID
      )
  
file_path: ray/python/ray/rllib/examples/connectors/self_play_with_policy_checkpoint.py
imports: import argparse
  from functools import partial
  import os
  import tempfile
  import ray
  from ray import air, tune
  from ray.rllib.algorithms.callbacks import DefaultCallbacks
  from ray.rllib.algorithms.sac import SACConfig
  from ray.rllib.env.utils import try_import_pyspiel
  from ray.rllib.env.wrappers.open_spiel import OpenSpielEnv
  from ray.rllib.examples.connectors.prepare_checkpoint import create_open_spiel_checkpoint
  from ray.rllib.policy.policy import Policy
  from ray.tune import CLIReporter, register_env
label_desc: Use image node_id 1 for calling a global function with example usage: policy_mapping_fn(agent_id, episode, worker) and returns: unknown