code: def _check_1d_array_object(parameter, name_param):
      """
      Checks whether given parameter is a 1d array like object,
      and returns a numpy array object
      """
      if isinstance(parameter, (np.ndarray, list, tuple, np.matrix)):
          parameter = np.array(parameter)
          if parameter.ndim != 1:
              raise TypeError(
                  "{} should be a 1d array type object".format(
                      name_param
                  )
              )
      else:
          raise TypeError(
              "{} should be a 1d array type object".format(name_param)
          )
  
      return parameter
  
label_desc: Use image node_id 1 for calling a global function with example usage: _check_1d_array_object(parameter, name_param) and returns: parameter