code: def check_new_observation_lime(new_observation):
      # lime accepts only np.array as data_row
  
      new_observation_ = deepcopy(new_observation)
      if isinstance(new_observation_, pd.Series):
          new_observation_ = new_observation_.to_numpy()
      elif isinstance(new_observation_, np.ndarray):
          if new_observation_.ndim == 2:
              if new_observation_.shape[0] != 1:
                  raise ValueError(
                      "'new_observation' should be a single row"
                  )
              # make 2D array 1D
              new_observation_ = new_observation_.flatten()
          elif new_observation_.ndim > 2:
              raise ValueError(
                  "'new_observation' has too many dimensions"
              )
      elif isinstance(new_observation_, list):
          new_observation_ = np.array(new_observation_)
      elif isinstance(new_observation_, pd.DataFrame):
          if new_observation_.shape[0] != 1:
              raise ValueError(
                  "'new_observation' should be a single row"
              )
          else:
              new_observation_ = new_observation_.to_numpy().flatten()
      else:
          raise TypeError(
              "'new_observation' must be a list or numpy.ndarray (1d) or pandas.Series or pandas.DataFrame"
          )
  
      return new_observation_
  
imports: import numpy
  import pandas
  from copy import deepcopy
  from warnings import warn
  from .helper import verbose_cat, is_y_in_data, get_model_info
  from .yhat import get_predict_function_and_model_type
label_desc: Use image node_id 16 for calling a global function with example usage: check_new_observation_lime(new_observation) and returns: new_observation_