class_docstr: Allow repeated specification of some dtype.
  
  Attributes
  ----------
  dtype:
      Data type of the repeated object.
  max_len:
      Optional parameter specifying if there is a maximum length of the
      repeated elements (`int > 0`). If `max_len=None`, there can be any
       number of repeated elements. By default: `None`.
code: def __post_init__(self):
      if not isinstance(self.dtype, BaseType):
          raise TypeError(
              f"dtype argument must inherit from {BaseType}"
          )
      if isinstance(self.dtype, type(self)):
          raise TypeError(
              f"cannot specify {type(self)} as dtype of {type(self)}"
          )
  
      if self.max_len is not None:
          if not isinstance(self.max_len, int):
              raise TypeError(
                  f"`max_len` must be {int}, not {type(self.max_len)}"
              )
          if self.max_len <= 0:
              raise ValueError(f"`max_len={self.max_len}` is not >= 1.")
  
file_path: lightning-flash/src/flash/core/serve/types/repeated.py
imports: from dataclasses import dataclass, field
  from typing import Any, Dict, Optional, Sequence, Tuple
  from torch import Tensor
  from flash.core.serve.types.base import BaseType
label_desc: Use image node_id 2 for calling the Repeated obj's underlying member method code with example usage: obj.__post_init__() without return types