code: def normalize_layout(
      layout, min_percentile=1, max_percentile=99, relative_margin=0.1
  ):
      """Removes outliers and scales layout to between [0,1]."""
  
      # compute percentiles
      mins = np.percentile(layout, min_percentile, axis=(0))
      maxs = np.percentile(layout, max_percentile, axis=(0))
  
      # add margins
      mins -= relative_margin * (maxs - mins)
      maxs += relative_margin * (maxs - mins)
  
      # `clip` broadcasts, `[None]`s added only for readability
      clipped = np.clip(layout, mins, maxs)
  
      # embed within [0,1] along both axes
      clipped -= clipped.min(axis=0)
      clipped /= clipped.max(axis=0)
  
      return clipped
  
imports: from __future__ import absolute_import, division, print_function
  import numpy
  import logging
  from umap import UMAP
label_desc: Use image node_id 1 for calling a global function with example usage: normalize_layout(layout, min_percentile, max_percentile, relative_margin) and returns: clipped