code: def _build_delta_masked_inputs(
      masks,
      batch_positions,
      num_mask_samples,
      num_varying_rows,
      delta_indexes,
      varying_rows,
      args,
      masker,
      variants,
      variants_column_sums,
  ):
      all_masked_inputs = [[] for a in args]
      dpos = 0
      i = -1
      masks_pos = 0
      while masks_pos < len(masks):
          i += 1
  
          dpos = 0
          delta_indexes[0] = masks[masks_pos]
  
          # update the masked inputs
          while (
              delta_indexes[dpos] < 0
          ):  # negative values mean keep going
              delta_indexes[dpos] = (
                  -delta_indexes[dpos] - 1
              )  # -value + 1 is the original index that needs flipped
              masker(delta_indexes[dpos], *args)
              dpos += 1
              delta_indexes[dpos] = masks[masks_pos + dpos]
          masked_inputs = masker(delta_indexes[dpos], *args).copy()
  
          masks_pos += dpos + 1
  
          num_mask_samples[i] = len(masked_inputs)
          # print(i, dpos, delta_indexes[dpos])
          # see which rows have been updated, so we can only evaluate the model on the rows we need to
          if i == 0:
              varying_rows[i, :] = True
              # varying_rows.append(np.arange(num_mask_samples[i]))
              num_varying_rows[i] = num_mask_samples[i]
  
          else:
              # only one column was changed
              if dpos == 0:
                  varying_rows[i, :] = variants[:, delta_indexes[dpos]]
                  # varying_rows.append(_variants_row_inds[delta_indexes[dpos]])
                  num_varying_rows[i] = variants_column_sums[
                      delta_indexes[dpos]
                  ]
  
              # more than one column was changed
              else:
                  varying_rows[i, :] = np.any(
                      variants[:, delta_indexes[: dpos + 1]], axis=1
                  )
                  # varying_rows.append(np.any(variants[:,delta_indexes[:dpos+1]], axis=1))
                  num_varying_rows[i] = varying_rows[i, :].sum()
  
          batch_positions[i + 1] = (
              batch_positions[i] + num_varying_rows[i]
          )
  
          # subset the masked input to only the rows that vary
          if num_varying_rows[i] != num_mask_samples[i]:
              if len(args) == 1:
                  masked_inputs = masked_inputs[varying_rows[i, :]]
              else:
                  masked_inputs = [
                      v[varying_rows[i, :]] for v in zip(*masked_inputs)
                  ]
  
          # wrap the masked inputs if they are not already in a tuple
          if len(args) == 1:
              masked_inputs = (masked_inputs,)
  
          for j in range(len(masked_inputs)):
              all_masked_inputs[j].append(masked_inputs[j])
  
      return all_masked_inputs, i + 1
  
imports: import copy
  import numpy
  import scipy.sparse
  from numba import njit
  from ..None import links
label_desc: Use image node_id 3 for calling a global function with example usage: _build_delta_masked_inputs(masks, batch_positions, num_mask_samples, num_varying_rows, delta_indexes, varying_rows, args, masker, variants, variants_column_sums) and returns: all_masked_inputs,  unknown