code: def max_length(self) -> Optional[int]:
      for stopping_criterium in self:
          if isinstance(stopping_criterium, MaxLengthCriteria):
              return stopping_criterium.max_length
          elif isinstance(stopping_criterium, MaxNewTokensCriteria):
              return stopping_criterium.max_length
      return None
  
imports: import time
  from abc import ABC
  from copy import deepcopy
  from typing import Optional
  from .file_utils import add_start_docstrings
  from fastNLP.envs.imports import _NEED_IMPORT_TORCH
  from fastNLP.core.log import logger
label_desc: Use image node_id 2 for calling the StoppingCriteriaList obj's underlying member method code with example usage: obj.max_length() and returns: None, stopping_criterium, stopping_criterium