code: def random(
      shape: tuple[int, int],
      seed: int = 2187,
      mask_fraction: float = 0.0,
  ) -> tuple[
      CoordinateArray,
      CoordinateArray,
      CoordinateArray | np.ma.MaskedArray[Any, Any],
  ]:
      """Return random test data.
  
      Args:
          shape (tuple(int, int)): 2D shape of data to return.
          seed (int, optional): Seed for random number generator, default 2187.
          mask_fraction (float, optional): Fraction of elements to mask, default 0.
  
      Return:
          Tuple of 3 arrays: ``x``, ``y``, ``z`` test data, ``z`` will be masked if
          ``mask_fraction`` is greater than zero.
      """
      ny, nx = shape
      x = np.arange(nx, dtype=np.float64)
      y = np.arange(ny, dtype=np.float64)
      x, y = np.meshgrid(x, y)
  
      rng = np.random.default_rng(seed)
      z = rng.uniform(size=shape)
  
      if mask_fraction > 0.0:
          mask_fraction = min(mask_fraction, 0.99)
          mask = rng.uniform(size=shape) < mask_fraction
          z = np.ma.array(z, mask=mask)  # type: ignore[no-untyped-call]
  
      return x, y, z
  
imports: from __future__ import annotations
  from typing import TYPE_CHECKING, Any
  import numpy
label_desc: Use image node_id 2 for calling a global function with example usage: random(shape, seed, mask_fraction) and returns: x,  y,  z