code: def _check_parameter_validity(y_true, y_pred):
      if any((val is None for val in (y_true, y_pred))):
          raise ValueError(
              "y_true and y_pred are needed to plot " "Residuals Plot"
          )
  
      if y_true.shape != y_pred.shape:
          raise ValueError("parameters should have same shape.")
  
file_path: sklearn-evaluation/src/sklearn_evaluation/plot/regression.py
imports: import matplotlib.pyplot
  import numpy
  import pandas
  from sklearn_evaluation.telemetry import SKLearnEvaluationLogger
  from sklearn.linear_model import LinearRegression
  from ploomber_core.exceptions import modify_exceptions
label_desc: Use image node_id 2 for calling a global function with example usage: _check_parameter_validity(y_true, y_pred) without return types