import uuid


def generate(**options):
    """
    generates a unique id based on input params.

    :keyword callable generator: uuid generator function.
                                 if not provided, defaults to uuid4.

    :rtype: uuid.UUID
    """

    generator = options.get('generator', uuid.uuid4)
    return generator()