import random


def sample_fraction_extra(fraction_extra):
    """If fraction_extra is a not a number then sample a value
        uniformally between the 2 elements, otherwise return
        fraction_extra
    """
    if not isinstance(fraction_extra, (int, float)):
        fraction_extra = random.uniform(fraction_extra[0], fraction_extra[1])

    return fraction_extra