'Evaluate the log likelihood of a performance.
Args:
sequence: The Performance object for which to evaluate the log likelihood.
note_density: Control note density on which performance is conditioned. If
None, don\'t condition on note density.
pitch_histogram: Control pitch class histogram on which performance is
conditioned. If None, don\'t condition on pitch class histogram
Returns:
The log likelihood of `sequence` under this model.
Raises:
ValueError: If both `note_density` and `pitch_histogram` are provided as
conditioning variables.'

def performance_log_likelihood(self, sequence, note_density=None, pitch_histogram=None):

    if ((note_density is not None) and (pitch_histogram is not None)):
        control_events = ([(note_density, pitch_histogram)] * len(sequence))
    elif (note_density is not None):
        control_events = ([note_density] * len(sequence))
    elif (pitch_histogram is not None):
        control_events = ([pitch_histogram] * len(sequence))
    else:
        control_events = None
    return self._evaluate_log_likelihood([sequence], control_events=control_events)[0]
