code: def from_config(schedule):
      if isinstance(schedule, Schedule):
          return schedule
      if isinstance(schedule, Tuple) or isinstance(schedule, List):
          return from_tuple(schedule)
      if isinstance(schedule, collections.Mapping):
          return from_dict(schedule)
  
      raise ValueError(f"Unknown type {type(schedule)}.")
  
imports: import abc
  import collections
  import copy
  import math
  from typing import Any, Iterable, List, Tuple, Union
  from jax import numpy
label_desc: Use image node_id 3 for calling a global function with example usage: from_config(schedule) and returns: schedule, from_tuple, from_dict