import uuid


def _maybe_convert(value):
    """Possibly convert the value to a :py:class:`uuid.UUID` or
    :py:class:`datetime.datetime` if possible, otherwise just return the value

    :param str value: The value to convert
    :rtype: uuid.UUID|datetime.datetime|str

    """
    try:
        return uuid.UUID(value)
    except ValueError:
        return value