def parse_field(self, field):
    field = field.strip().lower()
    if (field not in RobotsParser.valid_fields):
        raise ValueError('Record contains invalid field')
    return field
def parse_field(self, field):
    field = field.strip().lower()
    if (field not in RobotsParser.valid_fields):
        raise ValueError('Record contains invalid field')
    return field