code: def check_dimension_and_datatype(
      check_input: ArrayLike, text: str
  ) -> np.ndarray:
      """
      Raises errors related to:
      1. If input is empty
      2. If input is not 1-D
      3. If input is not numeric
  
      If all the checks are passed, it returns the squeezed 1-D array required by the main algorithm.
      """
  
      try:
          check_input = np.asarray(check_input)
      except:
          raise ValueError(
              f"{text} could not be converted to numpy array, check input."
          )
  
      # Check if input is empty
      if not check_input.size:
          raise ValueError(f"{text} cannot be empty array.")
  
      # Remove axis with length one
      check_input = np.squeeze(check_input)
  
      # Check if input is 1-D
      if check_input.ndim != 1:
          raise ValueError(
              f"Expected 1-Dimensional inputs for {text}, got {check_input.ndim} dimensions."
          )
  
      # Check if datatype is numeric
      if not np.issubdtype(check_input.dtype, np.number):
          raise ValueError(
              f"Expected {text} to contain numeric values, got values of type {check_input.dtype}."
          )
  
      return check_input
  
file_path: cleanlab/cleanlab/internal/regression_utils.py
imports: import numpy
  import pandas
  from numpy.typing import ArrayLike
  from typing import Tuple, Union
label_desc: Use image node_id 3 for calling a global function with example usage: check_dimension_and_datatype(check_input, text) and returns: check_input