def extract_operator(tags, operators):
    """
    Takes a list of tags and a dict of operator names mapped to their
    numbers and returns the operator number of the operator name in
    the list of tags.
    eg. ["@barry", "#question"] -> barry's operator number
    """
    for tag in tags:
        if tag[0] == "@":
            return operators[tag[1::]]
    return None