def userpriority(user_prior):
    """
    Compute user priority weight.

    Parameters
    ----------
    user_prior : string
        observation user priority (Low, Medium, High, or Target of Opportunity)
    """
    if 'Target of Opportunity' in user_prior:
        wprior = 500.
    elif user_prior == 'High':
        wprior = 2.
    elif user_prior == 'Medium':
        wprior = 1.
    elif user_prior == 'Low':
        wprior = 0.
    else:
        wprior = 0.
    return wprior