docstr: Simple utility to convert keys to partition indices.
docstr_tok: ["Simple","utility","to","convert","keys","to","partition","indices","."]
code: def _keys_to_parts(self, keys: Iterable[str]) -> set[str]:
      """Simple utility to convert keys to partition indices."""
      parts = set()
      for key in keys:
          try:
              _name, _part = key
          except ValueError:
              continue
          if _name != self.name:
              continue
          parts.add(_part)
      return parts
  
imports: from __future__ import annotations
  from collections.abc import Iterable, Sequence
  from typing import TYPE_CHECKING, Any
  import dask
  from dask.base import is_dask_collection, tokenize
  from dask.highlevelgraph import HighLevelGraph
  from dask.layers import Layer
  from distributed.shuffle._arrow import check_minimal_arrow_version
  from distributed.shuffle._core import ShuffleId, barrier_key, get_worker_plugin
  from distributed.shuffle._shuffle import shuffle_barrier, shuffle_transfer
label_desc: Use image node_id 3 for calling the HashJoinP2PLayer obj's underlying member method code with example usage: obj._keys_to_parts(keys) and returns: parts