<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def pick_best_methods(stochastic):
 """ Picks the StepMethods best suited to handle a stochastic variable. """


    # Keep track of most competent methohd
    max_competence = 0
    # Empty set of appropriate StepMethods
    best_candidates = set([])

    # Loop over StepMethodRegistry
    for method in StepMethodRegistry:

        # Parse method and its associated competence
        try:
            competence = method.competence(stochastic)
        except:
            competence = 0

        # If better than current best method, promote it
        if competence > max_competence:
            best_candidates = set([method])
            max_competence = competence

        # If same competence, add it to the set of best methods
        elif competence == max_competence:
            best_candidates.add(method)

    if max_competence <= 0:
        raise ValueError(
            'Maximum competence reported for stochastic %s is <= 0... you may need to write a custom step method class.' %
            stochastic.__name__)

    # print_(s.__name__ + ': ', best_candidates, ' ', max_competence)
    return best_candidates