code: def _get_inputs_shape_by_given_fields(
      self, inputs, shape, raw_chunk_size=None, tensor=True
  ):
      fields = getattr(self, "_input_fields_", [])
      to_one_chunk_fields = set(
          getattr(self, "_into_one_chunk_fields_", list())
      )
  
      field_to_obj = dict()
      to_broadcast_shapes = []
      if fields:
          if getattr(self, fields[0], None) is None:
              # create from beginning
              for field, val in zip(fields, inputs):
                  if field not in to_one_chunk_fields:
                      if isinstance(val, list):
                          val = np.asarray(val)
                      if tensor:
                          val = self._handle_arg(val, raw_chunk_size)
                  if isinstance(val, TENSOR_TYPE + TENSOR_CHUNK_TYPE):
                      field_to_obj[field] = val
                      if field not in to_one_chunk_fields:
                          to_broadcast_shapes.append(val.shape)
                  setattr(self, field, val)
          else:
              inputs_iter = iter(inputs)
              for field in fields:
                  if isinstance(
                      getattr(self, field),
                      TENSOR_TYPE + TENSOR_CHUNK_TYPE,
                  ):
                      field_to_obj[field] = next(inputs_iter)
  
      if tensor:
          if shape is None:
              shape = self._calc_shape(to_broadcast_shapes)
  
          for field, inp in field_to_obj.items():
              if field not in to_one_chunk_fields:
                  field_to_obj[field] = broadcast_to(inp, shape)
  
      yield [
          field_to_obj[f] for f in fields if f in field_to_obj
      ], shape
  
      inputs_iter = iter(getattr(self, "_inputs"))
      for field in fields:
          if field in field_to_obj:
              setattr(self, field, next(inputs_iter))
  
imports: import itertools
  from collections.abc import Iterable
  from contextlib import contextmanager
  import numpy
  from ...config import options
  from ...core import recursive_tile
  from ...serialization.serializables import FieldTypes, TupleField, Int32Field
  from ..core import TENSOR_TYPE, TENSOR_CHUNK_TYPE
  from ..utils import decide_chunk_sizes, gen_random_seeds, broadcast_shape
  from ..array_utils import array_module, device
  from ..operands import TensorOperand, TensorMapReduceOperand, TensorOperandMixin
  from ..datasource import tensor
  from ..base import broadcast_to
label_desc: Use image node_id 5 for calling the TensorRandomOperandMixin obj's underlying member method code with example usage: obj._get_inputs_shape_by_given_fields(inputs, shape, raw_chunk_size, tensor) without return types