Function that generates the monte-carlo grid file that gets imported
Function to write the function that can generate the sample for the parameter
"""
# Description of montecarlo grid generator:
# - Have the code write a generator object
# - A while loop that has no end
# - a system_dict that has all the relevant orbital properties.
# - this dict gets passed around to each of the CDF sampling methods for each of the parameters, potentially used as input for the probability (dependent distributions), and updated with the chosen parameter value
# - a dictionary of CDF sampling functions, with keys being the parameter that we want to sample, the values are functions that get passed a set of arguments, and return an updated system dict
# - (optionally) a latin hypercube implementation
# - function to write the CDF sampling functions for each sampling_variable
####################
Contrary to the grid sampling variable generator code, this code is not nested, but is linear.
Function to write the block of code (as string) that handles the setting the final probability, taking into account the weight and repeat settings, incrementing the total starcount and total probability.
Then if the run is a dry run we implement the dry_run_hook or pass depending on the settings. If it is not a dry run we yield the system dict