def move_subparam(self, input_socket, orientation):
        """Move subparameter one position up or down.

        Works by making the subparameter swap positions
        with its neighbour subparameter above or below it.
        """
        ### store parameter name in local variable
        param_name = input_socket.parameter_name

        ### reference list of subparam indices for this
        ### parameter
        subparam_indices = self.data["subparam_map"][param_name]

        ### retrieve the number of existing subparameters
        ### (length)
        length = len(subparam_indices)

        ### if length is only one, return earlier, since
        ### there's no position to change
        if length == 1:
            return

        ### give special names to some specific subparameters

        first_subparam_index = 0
        last_subparam_index = max(subparam_indices)

        ### retrieve the subparameter index (it represents
        ### its order/position from top to bottom)
        our_subparam_index = input_socket.subparameter_index

        ### otherwise, act according to orientation of
        ### movement and current position of the
        ### subparameter represented by the input socket

        if orientation == "up":

            ### if the subparameter is already the
            ### first one, return earlier, since there's
            ### no way to move it up any further
            if our_subparam_index == first_subparam_index:
                return

            ### otherwise, define an integer representing
            ### the distance between the current subparameter
            ### position to the desired one
            distance = -1

        elif orientation == "down":

            ### if the subparameter is already the
            ### last one, return earlier, since there's
            ### no way to move it down any further
            if our_subparam_index == last_subparam_index:
                return

            ### otherwise, define an integer representing
            ### the distance between the current subparameter
            ### position to the desired one
            distance = 1

        else:

            raise ValueError(
                "There shouldn't be another" " orientation besides 'up' or 'down'"
            )

        ### with the distance defined before, obtain the
        ### name of the neighbour subparameter whose
        ### position we want for our subparameter
        neighbour_subparam_index = our_subparam_index + distance

        ### create a temporary subparameteter name (note
        ### that a subparameter with this name don't exist
        ### yet)
        temp_subparam_index = last_subparam_index + 1

        ### swap the positions between the names we have,
        ### so that in the end our original subparam index
        ### ends up with the name of its neighbour and
        ### vice-versa

        ## list pairs indicating a subparameter index and
        ## the index which it should assume, the order is
        ## important in order to avoid having the indices
        ## overlap each other (that is, an index must
        ## always be changed to one which don't exist at
        ## the time of the change)

        changes = [
            (neighbour_subparam_index, temp_subparam_index),
            (our_subparam_index, neighbour_subparam_index),
            (temp_subparam_index, our_subparam_index),
        ]

        ## apply changes
        self.change_subparameter_indices(param_name, changes)

        ### reposition all objects within the node
        self.reposition_elements()

        ### if parameters is of keyword-variable kind, also
        ### recreate body's surface;
        ###
        ### this is needed because the key icon will have to be redrawn
        ### as well

        if self.var_kind_map[param_name] == "var_key":
            self.reset_body_height_and_image()

        ### indicate that changes were made in the data
        indicate_unsaved()
Move subparameter one position up or down.

        Works by making the subparameter swap positions
        with its neighbour subparameter above or below it.
        
nodezator/graphman/callablenode/subparam/main.py