code: def _poincare_normalize(x, dim, epsilon=1e-5):
      if isinstance(dim, list):
          norm = np.linalg.norm(x, axis=tuple(dim))
          for d in dim:
              norm = np.expand_dims(norm, d)
          norm_x = ((1.0 - epsilon) * x) / norm
      else:
          norm = np.expand_dims(
              np.apply_along_axis(np.linalg.norm, dim, x), dim
          )
          norm_x = ((1.0 - epsilon) * x) / norm
      return np.where(norm > 1.0 - epsilon, norm_x, x)
  
imports: import pytest
  import numpy
  from tensorflow_addons.layers.poincare import PoincareNormalize
  from tensorflow_addons.utils import test_utils
label_desc: Use image node_id 1 for calling a global function with example usage: _poincare_normalize(x, dim, epsilon) and returns: np