code: def ordered(obj):
      """Helper function for dict comparison.
  
      Recursively orders a json-like dict or list of dicts.
  
      Args:
          obj: either a list or a dict
  
      Returns:
          either a sorted list of elements or sorted list of tuples
      """
      if isinstance(obj, dict):
          return sorted((k, ordered(v)) for k, v in obj.items())
      if isinstance(obj, list):
          return sorted(ordered(x) for x in obj)
      else:
          return obj
  
imports: from __future__ import absolute_import
  from typing import List, Optional, Union, Callable
  from sagemaker.utils import base_from_name
  from sagemaker.workflow.properties import Properties
  from sagemaker.workflow.retry import RetryPolicy
  from sagemaker.workflow.step_outputs import StepOutput
  from sagemaker.workflow.steps import ConfigurableRetryStep, Step, StepTypeEnum, CacheConfig
  from sagemaker.workflow.step_collections import StepCollection
  from sagemaker.workflow.utilities import execute_job_functions
  from sagemaker.workflow.entities import RequestType
  from sagemaker.remote_function.job import _JobSettings
label_desc: Use image node_id 1 for calling a global function with example usage: ordered(obj) and returns: sorted, sorted, obj