code: def _pos_sqrt(value):
      """Returns sqrt of value or raises ValueError if negative."""
      if np.any(value < 0):
          raise ValueError(
              "Attempt to take sqrt of negative value: {}".format(value)
          )
      return np.sqrt(value)
  
imports: from collections.abc import Sequence
  import dataclasses
  from typing import Any
  import numpy
  from numpy import typing
  from tensorflow_model_analysis.experimental.lazytf import api
  from tensorflow_model_analysis.experimental.metrics.aggregates import _classification
label_desc: Use image node_id 1 for calling a global function with example usage: _pos_sqrt(value) and returns: np