code: def promote_async(
      self, request_id: uuid.UUID, metric: float
  ) -> List[searcher.Operation]:
      rung_idx = self.asha_search_state.trial_rungs[request_id]
      rung = self.asha_search_state.rungs[rung_idx]
      rung.outstanding_trials -= 1
      added_train_workload = False
  
      ops: List[searcher.Operation] = []
  
      if rung_idx == self.asha_search_state.num_rungs - 1:
          rung.metrics.append(
              TrialMetric(request_id=request_id, metric=metric)
          )
  
          if request_id not in self.asha_search_state.early_exit_trials:
              self.raise_exception("promote_async_close_trials")
              ops.append(searcher.Close(request_id=request_id))
              logging.info(f"Closing trial {request_id}")
              self.asha_search_state.closed_trials.add(request_id)
      else:
          next_rung = self.asha_search_state.rungs[rung_idx + 1]
          self.raise_exception("promote_async")
          logging.info(f"Promoting in rung {rung_idx}")
          for promoted_request_id in rung.promotions_async(
              request_id, metric, self.asha_search_state.divisor
          ):
              self.asha_search_state.trial_rungs[
                  promoted_request_id
              ] = (rung_idx + 1)
              next_rung.outstanding_trials += 1
              if (
                  promoted_request_id
                  not in self.asha_search_state.early_exit_trials
              ):
                  logging.info(f"Promoted {promoted_request_id}")
                  units_needed = max(
                      next_rung.units_needed - rung.units_needed, 1
                  )
                  ops.append(
                      searcher.ValidateAfter(
                          promoted_request_id, units_needed
                      )
                  )
                  added_train_workload = True
                  self.asha_search_state.pending_trials += 1
              else:
                  return self.promote_async(
                      promoted_request_id, sys.float_info.max
                  )
  
      all_trials = (
          len(self.asha_search_state.trial_rungs)
          - self.asha_search_state.invalid_trials
      )
      if (
          not added_train_workload
          and all_trials < self.asha_search_state.max_trials
      ):
          logging.info("Creating new trial instead of promoting")
          self.asha_search_state.pending_trials += 1
  
          create = searcher.Create(
              request_id=uuid.uuid4(),
              hparams=self.sample_params(),
              checkpoint=None,
          )
          ops.append(create)
          ops.append(
              searcher.ValidateAfter(
                  request_id=create.request_id,
                  length=self.asha_search_state.rungs[0].units_needed,
              )
          )
          self.asha_search_state.trial_rungs[create.request_id] = 0
  
      if (
          len(self.asha_search_state.rungs[0].metrics)
          == self.asha_search_state.max_trials
      ):
          ops.extend(self._get_close_rungs_ops())
  
      return ops
  
imports: import dataclasses
  import json
  import logging
  import pathlib
  import pickle
  import random
  import sys
  import uuid
  from typing import Any, Dict, List, Optional, Set
  from urllib3 import connectionpool
  from determined import searcher
label_desc: Use image node_id 7 for calling the ASHASearchMethod obj's underlying member method code with example usage: obj.promote_async(request_id, metric) and returns: ops, self