code: def _check_forward_mode_input_dict(self, var_tbl: dict) -> int:
          
          T: int = 1
          for var_name in var_tbl:
              # The bound value to this variable name
              val = var_tbl[var_name]
              # case 1: this is a scalar; T=1
              if isinstance(val, scalar_instance_types):
                  t = 1
              # case 2: this is an array; calulate T
              elif isinstance(val, np.ndarray):
                  t = self._calc_T_var(val)
              #case 3: throw an error
              else:
                  raise ValueError(f'val={val} in var_tbl; {type(val)} not a recognized value type.')
              #update T
              if t > 1 and T == 1:
                  T = t
              elif t not in (1,T):
                  raise ValueError(f'Bound variable {var_name} has inconsistent shape')
          return T
docs: Check whether one forward mode input dict has elements of valid shape
          Returns inferred value of T