code: def differs_by_one(ith, binaries, all=True, index=True):
      """get the binary string that differs by exactly one index
  
      Inputs:
        ith   = the target index
        binaries = a list of binary strings
        all   = if False, return only the results for indices < i
        index = if True, return the index of the results (not results themselves)
      """
      from numpy import asarray, where
  
      v = asarray(binaries)  # a list of binary strings
      vi = v[ith]
      if not all:
          v = v[:ith]  # XXX: or ith+1 ???
      dif = [
          [int(j[i]) != int(vi[i]) for i in range(len(j))].count(1)
          for j in v
      ]
      ind = 1 - asarray(dif) == 0
      if index:
          return list(where(ind == True)[0])
      return list(v[ind])
  
label_desc: Use image node_id 3 for calling a global function with example usage: differs_by_one(ith, binaries, all, index) and returns: list, list