code: def _ensure_float(data):
      """Make sure that data is a float type."""
      if data.dtype.kind != "f":
          if data.dtype.itemsize == "8":
              data = data.astype(np.float64)
          else:
              data = data.astype(np.float32)
      return data
  
imports: import warnings
  import numpy
  import pandas
  from scipy import linalg, signal
  from scipy.interpolate import CubicSpline
  from sklearn.utils import as_float_array, gen_even_slices
  from nilearn._utils import fill_doc, stringify_path
  from nilearn._utils.numpy_conversions import as_ndarray, csv_to_array
  from nilearn._utils.param_validation import check_run_sample_masks
label_desc: Use image node_id 8 for calling a global function with example usage: _ensure_float(data) and returns: data