import re


def valid_uuid(possible_uuid):
    """
    Checks that a possible UUID4 string is a valid UUID4.
    """
    regex = re.compile('^[a-f0-9]{8}-?[a-f0-9]{4}-?4[a-f0-9]{3}-?[89ab][a-f0-9]{3}-?[a-f0-9]{12}\Z', re.I)
    match = regex.match(possible_uuid)
    return bool(match)