<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_missing_simulations(self, param_list, runs=None):
 """ Return a list of the simulations among the required ones that are not available in the database. Args: param_list (list):
 a list of dictionaries containing all the parameters combinations. runs (int):
 an integer representing how many repetitions are wanted for each parameter combination, None if the dictionaries in param_list already feature the desired RngRun value. """


        params_to_simulate = []

        if runs is not None:  # Get next available runs from the database
            next_runs = self.db.get_next_rngruns()
            available_params = [r['params'] for r in self.db.get_results()]
            for param_comb in param_list:
                # Count how many param combinations we found, and remove them
                # from the list of available_params for faster searching in the
                # future
                needed_runs = runs
                for i, p in enumerate(available_params):
                    if param_comb == {k: p[k] for k in p.keys() if k != "RngRun"}:
                        needed_runs -= 1
                new_param_combs = []
                for needed_run in range(needed_runs):
                    # Here it's important that we make copies of the
                    # dictionaries, so that if we modify one we don't modify
                    # the others. This is necessary because after this step,
                    # typically, we will add the RngRun key which must be
                    # different for each copy.
                    new_param = deepcopy(param_comb)
                    new_param['RngRun'] = next(next_runs)
                    new_param_combs += [new_param]
                params_to_simulate += new_param_combs
        else:
            for param_comb in param_list:
                if not self.db.get_results(param_comb):
                    params_to_simulate += [param_comb]

        return params_to_simulate