code: def convert_to_binary(self, data, deterministic=False):
      if deterministic:
          precentile = np.percentile(data, self.percentile, axis=0)
          binary_treat_value = data <= precentile
      else:
          temp = data.argsort(axis=0)
          ranks = np.empty_like(temp)
          ranks[temp[:, 0], 0] = np.arange(data.shape[0])
          prob_t = ranks / data.shape[0]
          # Generating data with equal 0 and 1 (since ranks are uniformly distributed)
          binary_treat_value = np.random.binomial(
              1, prob_t[:, 0], data.shape[0]
          )
  
          # Flipping some values
          if self.percentile >= 0.5:
              mask = np.random.binomial(
                  1,
                  (1 - self.percentile) * 2,
                  len(binary_treat_value[binary_treat_value == 1]),
              )
              binary_treat_value[binary_treat_value == 1] = (
                  mask * binary_treat_value[binary_treat_value == 1]
              )
          else:
              mask = np.random.binomial(
                  1,
                  1 - self.percentile * 2,
                  len(binary_treat_value[binary_treat_value == 0]),
              )
              binary_treat_value[binary_treat_value == 0] = (
                  mask + binary_treat_value[binary_treat_value == 0]
              )
          binary_treat_value = binary_treat_value[:, np.newaxis]
  
      return binary_treat_value.astype(float)
  
imports: import numpy
label_desc: Use image node_id 4 for calling the DataGeneratingProcess obj's underlying member method code with example usage: obj.convert_to_binary(data, deterministic) and returns: binary_treat_value