def _verbose_printer(verbose):
    """
    Creates a drop-in replacement for the print() function that only prints if the variable "verbose" is true
    Args:
        verbose: Whether to turn on verbose printing or not
    Returns:
        A function that only prints if `verbose` was set to true.
    """
    if verbose:
        def inner(string):
            print(string)
    else:
        def inner(string):
            pass
    return inner