code: def collect_x_axis_data(
      x_trace: Metric, iters: np.ndarray
  ) -> Tuple[Optional[dict], Optional[dict]]:
      if not x_trace:
          return None, None
  
      x_axis_values = []
      x_axis_iters = []
      step_index_fn = x_trace.data.step_hash
      for idx in iters:
          try:
              x_val = x_trace.values[step_index_fn(idx.item())]
          except KeyError:
              x_val = None
          if x_val:
              x_axis_iters.append(step_index_fn(idx.item()))
              x_axis_values.append(x_val)
  
      if not x_axis_iters:
          return None, None
  
      return (
          numpy_to_encodable(np.array(x_axis_iters, dtype="float64")),
          numpy_to_encodable(np.array(x_axis_values, dtype="float64")),
      )
  
imports: import asyncio
  import numpy
  import random
  import struct
  import time
  from collections import namedtuple
  from itertools import chain
  from typing import Iterator, Tuple, Optional, List
  from typing import TYPE_CHECKING
  from fastapi import HTTPException
  from aim.storage.context import Context
  from aim.sdk import Run
  from aim.sdk.sequences.metric import Metric
  from aim.sdk.sequence_collection import SequenceCollection
  from aim.storage.query import syntax_error_check
  from aim.web.configs import AIM_PROGRESS_REPORT_INTERVAL
  from aim.web.api.projects.project import Project
  from aim.web.api.runs.pydantic_models import AlignedRunIn, TraceBase
  from aim.storage.treeutils import encode_tree
label_desc: Use image node_id 7 for calling a global function with example usage: collect_x_axis_data(x_trace, iters) and returns: numpy_to_encodable,  numpy_to_encodable, None,  None, None,  None