class_docstr: For the current recommendation models, we assume there will be three
  types of metrics, 1.) RecMetric, 2.) Throughput, 3.) StateMetric.
  
  RecMetric is a metric that is computed from the model outputs (labels,
  predictions, weights).
  
  Throughput is being a standalone type as its unique characteristic, time-based.
  
  StateMetric is a metric that is computed based on a model componenet
  (e.g., Optimizer) internal logic.
  
  Args:
      batch_size (int): batch size used by this trainer.
      world_size (int): the number of trainers.
      rec_tasks (Optional[List[RecTaskInfo]]): the information of the model tasks.
      rec_metrics (Optional[RecMetricList]): the list of the RecMetrics.
      throughput_metric (Optional[ThroughputMetric]): the ThroughputMetric.
      state_metrics (Optional[Dict[str, StateMetric]]): the dict of StateMetrics.
      compute_interval_steps (int): the intervals between two compute calls in the unit of batch number
      memory_usage_limit_mb (float): the memory usage limit for OOM check
  
  Call Args:
      Not supported.
  
  Returns:
      Not supported.
  
  Example:
      >>> config = dataclasses.replace(
      >>>     DefaultMetricsConfig, state_metrics=[StateMetricEnum.OPTIMIZERS]
      >>> )
      >>>
      >>> metricModule = generate_metric_module(
      >>>     metric_class=RecMetricModule,
      >>>     metrics_config=config,
      >>>     batch_size=128,
      >>>     world_size=64,
      >>>     my_rank=0,
      >>>     state_metrics_mapping={StateMetricEnum.OPTIMIZERS: mock_optimizer},
      >>>     device=torch.device("cpu"),
      >>>     pg=dist.new_group([0]),
      >>> )
class_docstr_tok: ["For","the","current","recommendation","models",",","we","assume","there","will","be","three","types","of","metrics",",","1",".",")","RecMetric",",","2",".",")","Throughput",",","3",".",")","StateMetric",".","RecMetric","is","a","metric","that","is","computed","from","the","model","outputs","(","labels",",","predictions",",","weights",")",".","Throughput","is","being","a","standalone","type","as","its","unique","characteristic",",","time-based",".","StateMetric","is","a","metric","that","is","computed","based","on","a","model","componenet","(","e.g.",",","Optimizer",")","internal","logic",".","Args",":","batch_size","(","int",")",":","batch","size","used","by","this","trainer",".","world_size","(","int",")",":","the","number","of","trainers",".","rec_tasks","(","Optional","[","List","[","RecTaskInfo","]","]",")",":","the","information","of","the","model","tasks",".","rec_metrics","(","Optional","[","RecMetricList","]",")",":","the","list","of","the","RecMetrics",".","throughput_metric","(","Optional","[","ThroughputMetric","]",")",":","the","ThroughputMetric",".","state_metrics","(","Optional","[","Dict","[","str",",","StateMetric","]","]",")",":","the","dict","of","StateMetrics",".","compute_interval_steps","(","int",")",":","the","intervals","between","two","compute","calls","in","the","unit","of","batch","number","memory_usage_limit_mb","(","float",")",":","the","memory","usage","limit","for","OOM","check","Call","Args",":","Not","supported",".","Returns",":","Not","supported",".","Example",":",">",">",">","config","=","dataclasses.replace","(",">",">",">","DefaultMetricsConfig",",","state_metrics=","[","StateMetricEnum.OPTIMIZERS","]",">",">",">",")",">",">",">",">",">",">","metricModule","=","generate_metric_module","(",">",">",">","metric_class=RecMetricModule",",",">",">",">","metrics_config=config",",",">",">",">","batch_size=128",",",">",">",">","world_size=64",",",">",">",">","my_rank=0",",",">",">",">","state_metrics_mapping=","{","StateMetricEnum.OPTIMIZERS",":","mock_optimizer","}",",",">",">",">","device=torch.device","(","``","cpu","''",")",",",">",">",">","pg=dist.new_group","(","[","0","]",")",",",">",">",">",")"]
code: def get_required_inputs(self) -> Optional[List[str]]:
      return self.rec_metrics.get_required_inputs()
  
imports: import abc
  import logging
  import time
  from typing import Any, Dict, List, Optional, Type, Union
  import torch
  import torch.distributed
  import torch.nn
  from torch.profiler import record_function
  from torchrec.metrics.accuracy import AccuracyMetric
  from torchrec.metrics.auc import AUCMetric
  from torchrec.metrics.auprc import AUPRCMetric
  from torchrec.metrics.calibration import CalibrationMetric
  from torchrec.metrics.ctr import CTRMetric
  from torchrec.metrics.mae import MAEMetric
  from torchrec.metrics.metrics_config import MetricsConfig, RecMetricEnum, RecMetricEnumBase, RecTaskInfo, StateMetricEnum
  from torchrec.metrics.metrics_namespace import compose_customized_metric_key, compose_metric_namespace, MetricNamespace
  from torchrec.metrics.model_utils import parse_task_model_outputs
  from torchrec.metrics.mse import MSEMetric
  from torchrec.metrics.multiclass_recall import MulticlassRecallMetric
  from torchrec.metrics.ndcg import NDCGMetric
  from torchrec.metrics.ne import NEMetric
  from torchrec.metrics.rec_metric import RecMetric, RecMetricList
  from torchrec.metrics.recall_session import RecallSessionMetric
  from torchrec.metrics.segmented_ne import SegmentedNEMetric
  from torchrec.metrics.throughput import ThroughputMetric
  from torchrec.metrics.tower_qps import TowerQPSMetric
  from torchrec.metrics.weighted_avg import WeightedAvgMetric
label_desc: Use image node_id 13 for calling the RecMetricModule obj's underlying member method code with example usage: obj.get_required_inputs() and returns: self