# Path: thejoker/logging.py
# class JokerHandler(StreamHandler):
# class JokerLogger(logging.getLoggerClass()):
#     def emit(self, record):
#     def _set_defaults(self):


import numpy as np
from .logging import logger
    from .samples import JokerSamples
                              n_requested_samples,
                              ln_prior=None,
                              init_batch_size=None,
                              growth_factor=128,
                              n_linear_samples=1):

    n_total_samples = len(prior_samples_batch)

    # The "magic numbers" below control how fast the iterative batches grow
    # in size, and the maximum number of iterations
    maxiter = 128  # MAGIC NUMBER
    safety_factor = 1  # MAGIC NUMBER
    if init_batch_size is None:
        n_process = growth_factor * n_requested_samples  # MAGIC NUMBER
    else:
        n_process = init_batch_size

    if n_process > n_total_samples:
        raise ValueError("Prior sample library not big enough! For "
                         "iterative sampling, you have to have at least "
                         "growth_factor * n_requested_samples = "
                         f"{growth_factor * n_requested_samples} samples in "
                         "the prior samples cache file. You have, or have "
                         f"limited to, {n_total_samples} samples.")

    all_idx = np.arange(0, n_total_samples, 1)

    all_marg_lls = np.array([])
    start_idx = 0
    for i in range(maxiter):

# Path: thejoker/logging.py
# class JokerHandler(StreamHandler):
# class JokerLogger(logging.getLoggerClass()):
#     def emit(self, record):
#     def _set_defaults(self):


# Path: thejoker/likelihood_helpers.py
import numpy as np
from .logging import logger
    from .samples import JokerSamples

                              n_requested_samples,
                              ln_prior=None,
                              init_batch_size=None,
                              growth_factor=128,
                              n_linear_samples=1):

    n_total_samples = len(prior_samples_batch)

    # The "magic numbers" below control how fast the iterative batches grow
    # in size, and the maximum number of iterations
    maxiter = 128  # MAGIC NUMBER
    safety_factor = 1  # MAGIC NUMBER
    if init_batch_size is None:
        n_process = growth_factor * n_requested_samples  # MAGIC NUMBER
    else:
        n_process = init_batch_size

    if n_process > n_total_samples:
        raise ValueError("Prior sample library not big enough! For "
                         "iterative sampling, you have to have at least "
                         "growth_factor * n_requested_samples = "
                         f"{growth_factor * n_requested_samples} samples in "
                         "the prior samples cache file. You have, or have "
                         f"limited to, {n_total_samples} samples.")

    all_idx = np.arange(0, n_total_samples, 1)

    all_marg_lls = np.array([])
    start_idx = 0
    for i in range(maxiter):

        logger.log(1, f"iteration {i}, computing {n_process} likelihoods")