<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def verbosity(verbosity):
 """ Convert the number of times the user specified '-v' on the command-line into a log level. """

    verbosity = int(verbosity)

    if verbosity == 0:
        return logging.WARNING
    if verbosity == 1:
        return logging.INFO
    if verbosity == 2:
        return logging.DEBUG
    if verbosity >= 3:
        return 0
    else:
        raise ValueError