code: def _log_erfc(x: float) -> float:
      """Compute log(erfc(x)) with high accuracy for large x."""
      try:
          return math.log(2) + special.log_ndtr(-x * 2**0.5)
      except NameError:
          # If log_ndtr is not available, approximate as follows:
          r = special.erfc(x)
          if r == 0.0:
              # Using the Laurent series at infinity for the tail of the erfc function:
              #     erfc(x) ~ exp(-x^2-.5/x^2+.625/x^4)/(x*pi^.5)
              # To verify in Mathematica:
              #     Series[Log[Erfc[x]] + Log[x] + Log[Pi]/2 + x^2, {x, Infinity, 6}]
              return (
                  -math.log(math.pi) / 2
                  - math.log(x)
                  - x**2
                  - 0.5 * x**-2
                  + 0.625 * x**-4
                  - 37.0 / 24.0 * x**-6
                  + 353.0 / 64.0 * x**-8
              )
          else:
              return math.log(r)
  
imports: import math
  from typing import Tuple, Union
  import numpy
  from scipy import special
  import six
label_desc: Use image node_id 8 for calling a global function with example usage: _log_erfc(x) and returns: unknown, unknown, math