import random


def random_bool_factor(f=0.5):
    """Return random bool value that is more likely to be True the closer ``f`` is to
    1.0.

    - ``f`` == [0, 1)
    - ``f`` = 1.0: Always return True
    - ``f`` = 0.1: Return True 10% of the time

    """
    return random.random() < f