code: def from_numpyflat_to_numpy3d(obj, store=None):
      if not isinstance(obj, np.ndarray) or len(obj.shape) != 2:
          raise TypeError("obj must be a 2D numpy.ndarray")
  
      shape = obj.shape
  
      # if store has old 2nd dimension, try to restore, otherwise assume 1
      if (
          isinstance(store, dict)
          and "numpy_second_dim" in store.keys()
          and isinstance(store["numpy_second_dim"], int)
          and shape[1] % store["numpy_second_dim"] == 0
      ):
          shape_1 = store["numpy_second_dim"]
          target_shape = (shape[0], shape_1, shape[1] / shape_1)
      else:
          target_shape = (shape[0], 1, shape[1])
  
      obj_in_3D = obj.reshape(target_shape)
  
      return obj_in_3D
  
imports: import numpy
  import pandas
  from sktime.datatypes._convert_utils._coerce import _coerce_df_dtypes
  from sktime.datatypes._convert_utils._convert import _extend_conversions
  from sktime.datatypes._panel._registry import MTYPE_LIST_PANEL
  from sktime.utils.pandas import df_map
  from sktime.utils.validation._dependencies import _check_soft_dependencies
label_desc: Use image node_id 47 for calling a global function with example usage: from_numpyflat_to_numpy3d(obj, store) and returns: obj_in_3D