code: def append_sample(self, v, vartype, _left=False):
          
          vstr = str(v).rjust(2)  # the variable will be len 0, or 1
          length = len(vstr)
  
          if vartype is dimod.SPIN:
              def f(datum):
                  return _spinstr(datum.sample[v], rjust=length)
          else:
              def f(datum):
                  return _binarystr(datum.sample[v], rjust=length)
  
          self.append(vstr, f, _left=_left)
docs: Add a sample column