code: def build_info_dict(_type_, *args, **kwargs):
      type_ = _type_.lower()
      if type_ == "sample":
          dict_ = SampleDict(*args, **kwargs)
      elif type_ == "net_out":
          dict_ = NetOutDict(*args, **kwargs)
          if paddle.distributed.ParallelEnv().nranks > 1:
              dict_ = dict(dict_)
      elif type_ == "pp_out":
          dict_ = PPOutDict(*args, **kwargs)
      elif type_ == "metric":
          dict_ = MetricDict(*args, **kwargs)
      else:
          raise ValueError(
              f"{_type_} is not a supported info dict type."
          )
      return dict_
  
imports: from itertools import cycle
  from collections import OrderedDict
  from collections.abc import MutableMapping
  import paddle
label_desc: Use image node_id 1 for calling a global function with example usage: build_info_dict(_type_) and returns: dict_