code: def _check_valid_data(self, data):
          
          if data.dtype.type is not np.float32 and \
                  data.dtype.type is not np.float64:
              raise ValueError(
                  'Illegal data type. Depth images only support float arrays')
  
          if len(data.shape) == 3 and data.shape[2] != 1:
              raise ValueError(
                  'Illegal data type. Depth images only support single channel')
docs: Checks that the given data is a float array with one channel.
  
          Parameters
          ----------
          data : :obj:`numpy.ndarray`
              The data to check.
  
          Raises
          ------
          ValueError
              If the data is invalid.