code: def _validate_x_censored(x, censored):
      x = np.asarray(x)
      if x.ndim != 1:
          raise ValueError("`x` must be one-dimensional.")
      censored = np.asarray(censored)
      if censored.ndim != 1:
          raise ValueError("`censored` must be one-dimensional.")
      if (~np.isfinite(x)).any():
          raise ValueError("`x` must not contain nan or inf.")
      if censored.size != x.size:
          raise ValueError(
              "`x` and `censored` must have the same length."
          )
      return x, censored.astype(bool)
  
file_path: scipy/scipy/stats/_censored_data.py
imports: import numpy
label_desc: Use image node_id 3 for calling a global function with example usage: _validate_x_censored(x, censored) and returns: x,  censored