def print_optional(string, print_in_log):
    """Print a statement based on a string and a boolean wheter to really print or not.

    Parameters
    ----------
        string : str
            string to be printed

        print_in_log : bool
            boolean on whether the string should really be printed
    """
    if print_in_log:
        print(string)
