code: def get_embedding_extent(embedding: Union[np.ndarray, pd.DataFrame]):
      """helper function to get the extent of the embedding
  
      Args:
          embedding (Union[np.ndarray, pd.DataFrame]): umap embedding
  
      Returns:
          Tuple: tuple of min and max x and y
      """
      mminx, mmaxx = embedding.T[0].min(), embedding.T[0].max()
      mminy, mmaxy = embedding.T[1].min(), embedding.T[1].max()
  
      deltax = mmaxx - mminx
      deltay = mmaxy - mminy
  
      logger.info(
          f"min extent x: {mminx}, max extent x: {mmaxx}, delta: {deltax}"
      )
      logger.info(
          f"min extent y: {mminy}, max extent y: {mmaxy}, delta: {deltay}"
      )
      return mminx, mmaxx, mminy, mmaxy
  
imports: from typing import Union, Tuple
  import pandas
  import logging
label_desc: Use image node_id 2 for calling a global function with example usage: get_embedding_extent(embedding) and returns: mminx,  mmaxx,  mminy,  mmaxy