def fix_subparameter_indices(self, param_name):
        """Fix subparameter which doesn't conform to design.

        Works by ensuring subparameter indices go from 0 to n
        in increments of 1 (n = length - 1), that is, that
        there's no gap between the numbers.

        While looking for gaps in the subparameter indices,
        this function puts together a list with the data
        needed to fix the problem and delegates the actual
        corrections to another method.
        """
        ### reference list of subparam indices for this
        ### parameter
        subparam_indices = self.data["subparam_map"][param_name]

        ### obtain a new list from it, sorting the contents
        sorted_subparam_indices = sorted(subparam_indices)

        ### iterate over the sorted subparam indices,
        ### discovering the ones which need to be fixed

        ## create list to store changes needed
        needed_changes = []

        ## iterate

        for right_index, subparam_index in enumerate(sorted_subparam_indices):

            ## alias the subparam_index as the current
            ## one
            current_index = subparam_index

            ## if the current name is different from
            ## the expected right name, we store a
            ## tuple with both names in the 'changes'
            ## list

            if current_index != right_index:

                needed_changes.append((current_index, right_index))

        ### now that you put together a list containing
        ### the data for the changes to be made, you can
        ### finally delegate the actual changing operations
        ### to another method (this is ok even if the list
        ### of needed changes is empty)

        self.change_subparameter_indices(
            param_name,
            needed_changes,
        )
Fix subparameter which doesn't conform to design.

        Works by ensuring subparameter indices go from 0 to n
        in increments of 1 (n = length - 1), that is, that
        there's no gap between the numbers.

        While looking for gaps in the subparameter indices,
        this function puts together a list with the data
        needed to fix the problem and delegates the actual
        corrections to another method.
        
nodezator/graphman/callablenode/subparam/main.py