code: def check_numpy3d_panel(obj, return_metadata=False, var_name="obj"):
      if not isinstance(obj, np.ndarray):
          msg = f"{var_name} must be a numpy.ndarray, found {type(obj)}"
          return _ret(False, msg, None, return_metadata)
  
      if not len(obj.shape) == 3:
          msg = f"{var_name} must be a 3D numpy.ndarray, but found {len(obj.shape)}D"
          return _ret(False, msg, None, return_metadata)
  
      # we now know obj is a 3D np.ndarray
      metadata = dict()
      if _req("is_empty", return_metadata):
          metadata["is_empty"] = (
              len(obj) < 1 or obj.shape[1] < 1 or obj.shape[2] < 1
          )
      if _req("is_univariate", return_metadata):
          metadata["is_univariate"] = obj.shape[1] < 2
      # np.arrays are considered equally spaced and equal length by assumption
      if _req("is_equally_spaced", return_metadata):
          metadata["is_equally_spaced"] = True
      if _req("is_equal_length", return_metadata):
          metadata["is_equal_length"] = True
  
      if _req("n_instances", return_metadata):
          metadata["n_instances"] = obj.shape[0]
      if _req("is_one_series", return_metadata):
          metadata["is_one_series"] = obj.shape[0] == 1
      if _req("n_panels", return_metadata):
          metadata["n_panels"] = 1
      if _req("is_one_panel", return_metadata):
          metadata["is_one_panel"] = True
      if _req("n_features", return_metadata):
          metadata["n_features"] = obj.shape[1]
      if _req("feature_names", return_metadata):
          metadata["feature_names"] = list(range(obj.shape[1]))
  
      # check whether there any nans; only if requested
      if _req("has_nans", return_metadata):
          metadata["has_nans"] = pd.isnull(obj).any()
  
      return _ret(True, None, metadata, return_metadata)
  
file_path: sktime/sktime/datatypes/_panel/_check.py
imports: import numpy
  import pandas
  from pandas.core.dtypes.cast import is_nested_object
  from sktime.datatypes._common import _req, _ret
  from sktime.datatypes._series._check import _index_equally_spaced, check_pddataframe_series
  from sktime.utils.validation._dependencies import _check_soft_dependencies
  from sktime.utils.validation.series import is_in_valid_index_types, is_integer_index
label_desc: Use image node_id 4 for calling a global function with example usage: check_numpy3d_panel(obj, return_metadata, var_name) and returns: _ret, _ret, _ret