code: def mean_squared_error(
      y_true: ArrayLike,
      y_pred: ArrayLike,
      sample_weight: Optional[ArrayLike] = None,
      multioutput: Optional[str] = "uniform_average",
      squared: bool = True,
      compute: bool = True,
  ) -> ArrayLike:
      _check_sample_weight(sample_weight)
      output_errors = ((y_pred - y_true) ** 2).mean(axis=0)
  
      if isinstance(multioutput, str) or multioutput is None:
          if multioutput == "raw_values":
              if compute:
                  return output_errors.compute()
              else:
                  return output_errors
      else:
          raise ValueError("Weighted 'multioutput' not supported.")
      result = output_errors.mean()
      if not squared:
          result = da.sqrt(result)
      if compute:
          result = result.compute()
      return result
  
file_path: dask-ml/dask_ml/metrics/regression.py
imports: from typing import Optional
  import dask.array
  import numpy
  import sklearn.metrics
  from dask import is_dask_collection
  from dask.utils import derived_from
  from .._typing import ArrayLike
label_desc: Use image node_id 3 for calling a global function with example usage: mean_squared_error(y_true, y_pred, sample_weight, multioutput, squared, compute) and returns: result, output_errors, output_errors