def METHOD_NAME(ids):
    for identifier in ids:
        try:
            if not isinstance(identifier, UUID):
                UUID(identifier, version=4)
        except (TypeError, ValueError):
            # the value is not a valid hex code for a UUID, so we don't return any results
            raise UUIDValidationError(
                "{} did not pass UUID validation".format(identifier)
            )
    return ids