code: def _mesh_assignment_free(new_assignment, existing_assignments):
      """Determines if a given mesh axis has already been assigned."""
      new = set(jax.tree_util.tree_leaves(new_assignment))
      existing = set(jax.tree_util.tree_leaves(existing_assignments))
      if existing.intersection(new):
          return False
      return True
  
imports: import collections
  import contextlib
  import dataclasses
  import enum
  import functools
  import threading
  from typing import Any, Callable, List, Optional, Sequence, Tuple, Union
  import jax
  from jax import lax
  from jax.experimental import maps
  from flax import struct
  from flax.core import meta
label_desc: Use image node_id 4 for calling a global function with example usage: _mesh_assignment_free(new_assignment, existing_assignments) and returns: True, False