def MakeWireIDs(ids):
  id_to_wire = {
      cmd_id: sum(ord(c) << (i % 8) for i, c in enumerate(cmd_id))
      for cmd_id in ids
  }
  wire_to_id = {wire: cmd_id for cmd_id, wire in id_to_wire.items()}
  return id_to_wire, wire_to_id
dataset/ETHPy150Open google/python-adb/adb/adb_protocol.py/MakeWireIDs/operator `*` -> `%`