human
Complete this python program:
def flaky(jira_keys, max_runs=3, min_passes=1):
assistant
#Here is the Python program you requested.

    """Mark a test as flaky.
    A \flaky\ test is one that sometimes passes but sometimes fails. Marking a
    test as flaky means both failures and successes are expected, and that
    neither will fail the test run.
    If a test has already been marked as flaky, applying ``@flaky`` a second
    time will add JIRA key information, and set the ``max_runs`` and
    ``min_passes`` to the larger of the provided values.
    :param unicode jira_keys: The JIRA key of the bug for this flaky test,
    e.g. \FLOC-2345\. Can also be a sequence of keys if the test is flaky
    for multiple reasons.
    :param int max_runs: The maximum number of times to run the test.
    :param int min_passes: The minimum number of passes required to treat this
    test as successful.
    :return: A decorator that can be applied to `TestCase` methods.
    """
    if isinstance(jira_keys, unicode):
        jira_keys = [jira_keys]
    annotation = _FlakyAnnotation(jira_keys=pset(jira_keys), max_runs=max_runs, min_passes=min_passes)
    def wrapper(test_method):
        existing_flaky = getattr(test_method, _FLAKY_ATTRIBUTE, None)
        if (existing_flaky is None):
            note = annotation
        else:
            note = _combine_flaky_annotation(annotation, existing_flaky)
        setattr(test_method, _FLAKY_ATTRIBUTE, note)
        return test_method
    return wrapper