code: def sample(self, n_samples, divs=1, visual=False, safe=False):
          
          if visual: 
              print("Sampling: 0%")
          for i in xrange(divs):
              self._sample(int(n_samples/divs))
              if visual: 
                  sys.stdout.write("\033[F") # curser up
                  print("Sampling: "+str(int(i*100./divs)+1)+'%')
              if safe: 
                  self.save(path="chain_{:}.dat".format(i))
          if n_samples % divs != 0:
              self._sample(n_samples % divs)
              if safe: 
                  self.save(path="chain_{:}.dat".format(divs))
docs: Sample
          Sampling 
      Inputs  : 
          n_samples :
              number of samples to generate
      Optional Inputs : 
          divs : (1)
              number of divisions
          visual : 
              show progress 
          safe : 
              save the chain at every division