code: def components_to_h3(components):
      h3 = 18446744073709551615
      h3 = set_bits(h3, 64 - 5, 4, components["mode"])
      h3 = set_bits(h3, 64 - 8, 3, components["edge"])
      h3 = set_bits(h3, 64 - 12, 4, components["resolution"])
      h3 = set_bits(h3, 64 - 19, 7, components["base_cell"])
      for i, cell in enumerate(components["cells"]):
          h3 = set_bits(h3, 64 - 19 - (i + 1) * 3, 3, cell)
      h3 = set_bits(h3, 64 - 1, 4, 0)
      return h3
  
file_path: ludwig/ludwig/utils/h3_util.py
imports: from typing import List, NamedTuple
label_desc: Use image node_id 3 for calling a global function with example usage: components_to_h3(components) and returns: h3