code: def idx(self, item):
      for idx, val in enumerate(self.keys()):
          if val == item:
              return idx
      raise KeyError(f"{item} is not in {self}")
  
file_path: PaddleSeg/EISeg/eiseg/util/manager.py
imports: import inspect
  from collections.abc import Sequence
label_desc: Use image node_id 7 for calling the ComponentManager obj's underlying member method code with example usage: obj.idx(item) and returns: idx