def get_random_value(field):
    """
    Calls the dispatch method (``get_factory_func``) and passes the field
    obj argument to the callable returned.

    Returns:
        random value depending on field type and constraints in the field
            object
    """
    func = get_factory_func(field)

    if field.default is not None:
        if callable(field.default):
            return field.default()
        return field.default

    if field.choices:
        return random.choice(field.choices)

    return func(field)