code: def refactor(code: str) -> str:
      """Update a source code string from deprecated to modern Hypothesis APIs.
  
      This may not fix *all* the deprecation warnings in your code, but we're
      confident that it will be easier than doing it all by hand.
  
      We recommend using the CLI, but if you want a Python function here it is.
      """
      context = cst.codemod.CodemodContext()
      mod = cst.parse_module(code)
      transforms: List[VisitorBasedCodemodCommand] = [
          HypothesisFixPositionalKeywonlyArgs(context),
          HypothesisFixComplexMinMagnitude(context),
          HypothesisFixHealthcheckAll(context),
          HypothesisFixCharactersArguments(context),
      ]
      for transform in transforms:
          mod = transform.transform_module(mod)
      return mod.code
  
imports: import functools
  import importlib
  from inspect import Parameter, signature
  from typing import ClassVar, List
  import libcst
  import libcst.matchers
  from libcst.codemod import VisitorBasedCodemodCommand
label_desc: Use image node_id 1 for calling a global function with example usage: refactor(code) and returns: mod