code: def comp_to_kwargs(
      x: ast.AST, op: ast.AST, y: ast.AST, *, argname: str
  ) -> dict:
      a = convert(x, argname)
      b = convert(y, argname)
      num = (int, float)
      if not (a is ARG and isinstance(b, num)) and not (
          isinstance(a, num) and b is ARG
      ):
          # It would be possible to work out if comparisons between two literals
          # are always true or false, but it's too rare to be worth the complexity.
          # (and we can't even do `arg == arg`, because what if it's NaN?)
          raise ValueError("Can't analyse this comparison")
  
      if isinstance(op, ast.Lt):
          if a is ARG:
              return {"max_value": b, "exclude_max": True}
          return {"min_value": a, "exclude_min": True}
      elif isinstance(op, ast.LtE):
          if a is ARG:
              return {"max_value": b}
          return {"min_value": a}
      elif isinstance(op, ast.Eq):
          if a is ARG:
              return {"min_value": b, "max_value": b}
          return {"min_value": a, "max_value": a}
      elif isinstance(op, ast.GtE):
          if a is ARG:
              return {"min_value": b}
          return {"max_value": a}
      elif isinstance(op, ast.Gt):
          if a is ARG:
              return {"min_value": b, "exclude_min": True}
          return {"max_value": a, "exclude_max": True}
      raise ValueError("Unhandled comparison operator")
  
imports: import ast
  import inspect
  import math
  import operator
  from decimal import Decimal
  from fractions import Fraction
  from functools import partial
  from typing import Any, Callable, Collection, Dict, NamedTuple, Optional, TypeVar
  from hypothesis.internal.compat import ceil, floor
  from hypothesis.internal.floats import next_down, next_up
  from hypothesis.internal.reflection import extract_lambda_source
label_desc: Use image node_id 2 for calling a global function with example usage: comp_to_kwargs(x, op, y) and returns: dict, dict, dict, dict, dict, dict, dict, dict, dict, dict