code: def sample(self, bqm, sampling_mode=True, **parameters):
          
          # use roof-duality to decide which variables to fix
          parameters['fixed_variables'] = fix_variables(bqm, sampling_mode=sampling_mode)
          return super(RoofDualityComposite, self).sample(bqm, **parameters)
docs: Sample from the provided binary quadratic model.
  
          Uses the :func:`~dimod.roof_duality.fix_variables` function to determine
          which variables to fix.
  
          Args:
              bqm (:obj:`dimod.BinaryQuadraticModel`):
                  Binary quadratic model to be sampled from.
  
              sampling_mode (bool, optional, default=True):
                  In sampling mode, only roof-duality is used. When
                  `sampling_mode` is false, strongly connected components are used
                  to fix more variables, but in some optimal solutions these
                  variables may take different values.
  
              **parameters:
                  Parameters for the child sampler.
  
          Returns:
              :obj:`dimod.SampleSet`