def METHOD_NAME(
    self, mapping: Mapping[int, int], trials: int = 4, parallel_threshold: int = 50
) -> list[Swap[int]]:
    """Perform an approximately optimal Token Swapping algorithm to implement the permutation.
    Supports partial mappings (i.e. not-permutations) for graphs with missing tokens.
    Based on the paper: Approximation and Hardness for Token Swapping by Miltzow et al. (2016)
    ArXiV: https://arxiv.org/abs/1602.05150
    and generalization based on our own work.
    Args:
      mapping: The partial mapping to implement in swaps.
      trials: The number of trials to try to perform the mapping. Minimize over the trials.
      parallel_threshold: The number of nodes in the graph beyond which the algorithm
            will use parallel processing
    Returns:
      The swaps to implement the mapping
    """
    # Since integer seed is used in rustworkx, take random integer from np.random.randint
    # and use that for the seed.
    seed = self.seed.integers(1, 10000)
    return rx.graph_token_swapper(self.graph, mapping, trials, seed, parallel_threshold)