docstr: Method containing league-building logic. Called after train step.
  
  Args:
      result: The most recent result dict with all necessary stats in
          it (e.g. episode rewards) to perform league building
          operations.
docstr_tok: ["Method","containing","league-building","logic",".","Called","after","train","step",".","Args",":","result",":","The","most","recent","result","dict","with","all","necessary","stats","in","it","(","e.g",".","episode","rewards",")","to","perform","league","building","operations","."]
code: def build_league(self, result: ResultDict) -> None:
      """Method containing league-building logic. Called after train step.
  
      Args:
          result: The most recent result dict with all necessary stats in
              it (e.g. episode rewards) to perform league building
              operations.
      """
      raise NotImplementedError
  
imports: import logging
  import re
  from abc import ABCMeta
  from collections import defaultdict
  from typing import Any, DefaultDict, Dict
  import numpy
  from ray.rllib.algorithms.algorithm import Algorithm
  from ray.rllib.algorithms.algorithm_config import AlgorithmConfig
  from ray.rllib.examples.policy.random_policy import RandomPolicy
  from ray.rllib.policy.policy import PolicySpec
  from ray.rllib.utils.annotations import ExperimentalAPI, override
  from ray.rllib.utils.numpy import softmax
  from ray.rllib.utils.typing import PolicyID, ResultDict
label_desc: Use image node_id 2 for calling the LeagueBuilder obj's underlying member method code with example usage: obj.build_league(result) without return types