code: def assert_valid_prediction_inputs(
      labels: ArrayLike,
      predictions: ArrayLike,
      method: str,
  ) -> Tuple[np.ndarray, np.ndarray]:
      """Checks that ``labels``, ``predictions``, ``method`` are correctly formatted."""
  
      # Load array_like input as numpy array. If not raise error.
      try:
          labels = np.asarray(labels)
      except:
          raise ValueError(f"labels must be array_like.")
  
      try:
          predictions = np.asarray(predictions)
      except:
          raise ValueError(f"predictions must be array_like.")
  
      # Check if labels and predictions are 1-D and numeric
      valid_labels = check_dimension_and_datatype(
          check_input=labels, text="labels"
      )
      valid_predictions = check_dimension_and_datatype(
          check_input=predictions, text="predictions"
      )
  
      # Check if number of examples are same.
      assert (
          valid_labels.shape == valid_predictions.shape
      ), f"Number of examples in labels {labels.shape} and predictions {predictions.shape} are not same."
  
      # Check if inputs have missing values
      check_missing_values(valid_labels, text="labels")
      check_missing_values(valid_predictions, text="predictions")
  
      # Check if method is among allowed scoring method
      scoring_methods = ["residual", "outre"]
      if method not in scoring_methods:
          raise ValueError(
              f"Specified method '{method}' must be one of: {scoring_methods}."
          )
  
      # return 1-D numpy array
      return valid_labels, valid_predictions
  
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 1 for calling a global function with example usage: assert_valid_prediction_inputs(labels, predictions, method) and returns: valid_labels,  valid_predictions