def get_index()

in src/pydolphinscheduler/core/resource_plugin.py [0:0]


    def get_index(self, s: str, x, n):
        """Find the subscript of the nth occurrence of the X character in the string s."""
        if n <= s.count(x):
            all_index = [key for key, value in enumerate(s) if value == x]
            return all_index[n - 1]
        else:
            raise PyResPluginException("Incomplete path.")