code: def sample_poly(self, poly, **kwargs):
          
          tkw = self._truncate_kwargs
          if self._aggregate:
              return self.child.sample_poly(poly, **kwargs).aggregate().truncate(**tkw)
          else:
              return self.child.sample_poly(poly, **kwargs).truncate(**tkw)
docs: Sample from the binary polynomial and truncate output.
  
          Args:
              poly (obj:`.BinaryPolynomial`): A binary polynomial.
  
              **kwargs:
                  Parameters for the sampling method, specified by the child
                  sampler.
  
          Returns:
              :obj:`dimod.SampleSet`