Dump a model to a file as a pickle file.

    Parameters
    ----------
    model: Model
        Model instance.
    filename: str
        A path to the file in which to store the pickle output.

def model_to_file(model, filename):
    """Dump a model to a file as a pickle file.

    Parameters
    ----------
    model: Model
        Model instance.
    filename: str
        A path to the file in which to store the pickle output.
    """
    with open(filename, 'wb') as f:
        pickle.dump(model, f)