def _sort_parameters(self, parameters, names):
        """
        Sort a provided list of action parameters.

        :type parameters: ``list``
        :type names: ``list`` or ``set``
        """
        sorted_parameters = sorted(
            names,
            key=lambda name: self._get_parameter_sort_value(
                parameters=parameters, name=name
            ),
        )

        return sorted_parameters

        Sort a provided list of action parameters.

        :type parameters: ``list``
        :type names: ``list`` or ``set``
        
st2client/st2client/commands/action.py