code: def distance_parabola(
      point: List[int], rel_str: str, TOL: float = 1e-10
  ):
      """
      Returns the minimum distance from the given point to the relation given by `rel_str` which has the form:
      y = A x^2 + B x + C
      """
      rel_str = rel_str.split(" = ")[-1]
      expr = sympy.parse_expr(
          rel_str.replace("^", "**"),
          transformations=SYMPY_TRANSFORMATIONS,
      )
      poly = sympy.Poly(expr, list(expr.free_symbols))
      x = list(expr.free_symbols)[0]
      x0, y0 = point
      dist = (x - x0) ** 2 + (poly - y0) ** 2
      deriv = sympy.diff(dist, x)
      try:
          sols = sympy.solve(deriv, x)
      except ZeroDivisionError:
          # This shouldn't happen, but has happened for a prior implementation of
          # `distance_paraboloid`, so catch it conservatively:
          print("Failed to compute minimum distance.")
          # pdb.set_trace()
          return float(0.0)
      dist_vals = list(map(lambda _: sympy.N(dist.eval(_)), sols))
      try:
          dist_val = min(
              [
                  sympy.re(_)
                  for _ in dist_vals
                  if abs(sympy.im(_)) < TOL and sympy.re(_) >= 0
              ]
          )
      except ValueError:
          # A real solution should exist, but if not (eg. numerical error exceeds TOL):
          print("Failed to compute minimum distance.")
          # pdb.set_trace()
          return float(0.0)
      return np.sqrt(float(dist_val))
  
imports: from collections import defaultdict
  from dataclasses import dataclass, field
  from itertools import combinations_with_replacement, product
  import math
  from math import comb
  import numpy
  import numpy.typing
  import random
  import sympy
  from sympy import Symbol, Poly, diff
  from sympy.parsing.sympy_parser import standard_transformations, implicit_multiplication_application
  from typing import List, Optional, Tuple, Dict
  from helm.benchmark.adaptation.adapters.adapter_factory import ADAPT_GENERATION
  from helm.benchmark.adaptation.adapter_spec import AdapterSpec
  from helm.benchmark.window_services.tokenizer_service import TokenizerService
  from helm.common.authentication import Authentication
  from helm.proxy.services.server_service import ServerService
  from .scenario import Scenario, Instance, Reference, TRAIN_SPLIT, TEST_SPLIT, CORRECT_TAG, Input, Output
label_desc: Use image node_id 14 for calling a global function with example usage: distance_parabola(point, rel_str, TOL) and returns: np, float, float