<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def sample_markov_network(MN, sampler=None, fixed_variables=None, return_sampleset=False, **sampler_args):
 """Samples from a markov network using the provided sampler. Parameters G : NetworkX graph A Markov Network as returned by :func:`.markov_network` sampler A binary quadratic model sampler. A sampler is a process that samples from low energy states in models defined by an Ising equation or a Quadratic Unconstrained Binary Optimization Problem (QUBO). A sampler is expected to have a 'sample_qubo' and 'sample_ising' method. A sampler is expected to return an iterable of samples, in order of increasing energy. If no sampler is provided, one must be provided using the `set_default_sampler` function. fixed_variables : dict A dictionary of variable assignments to be fixed in the markov network. return_sampleset : bool (optional, default=False) If True, returns a :obj:`dimod.SampleSet` rather than a list of samples. **sampler_args Additional keyword parameters are passed to the sampler. Returns ------- samples : list[dict]/:obj:`dimod.SampleSet` A list of samples ordered from low-to-high energy or a sample set. Examples -------- {'a': 0, 'b': 0} Sample(sample={'a': 0, 'b': 0}, energy=-1.0, num_occurrences=1) {'a': 0, 'c': 0, 'b': 0} Notes ----- Samplers by their nature may not return the optimal solution. This function does not attempt to confirm the quality of the returned sample. """


    bqm = markov_network_bqm(MN)

    # use the FixedVar
    fv_sampler = dimod.FixedVariableComposite(sampler)

    sampleset = fv_sampler.sample(bqm, fixed_variables=fixed_variables,
                                  **sampler_args)

    if return_sampleset:
        return sampleset
    else:
        return list(map(dict, sampleset.samples()))