def vprint(message, logger=None, verbose=False):
    """
    Prints a message if verbose is True.
    Can also redirect output to a logger instance.

    :param message: The message string to print.
    :param logger: Either a logger instance or None
    :param verbose: If True prints the message
    """
    if verbose:
        if logger is not None:
            logger.info(message)
        else:
            print(message)
    else:
        pass
