docs: def canonicalize(ctx, statement, namespace_targets, version, api, config_fn):
      """Canonicalize statement
  
      Target namespaces can be provided in the following manner:
  
          bel stmt canonicalize "<BELStmt>" --namespace_targets '{"HGNC": ["EG", "SP"], "CHEMBL": ["CHEBI"]}'
              the value of target_namespaces must be JSON and embedded in single quotes
              reserving double quotes for the dictionary elements
      """
  
      if config_fn:
          config = bel.db.Config.merge_config(ctx.config, override_config_fn=config_fn)
      else:
          config = ctx.config
  
      # Configuration - will return the first truthy result in list else the default option
      if namespace_targets:
          namespace_targets = json.loads(namespace_targets)
  
      namespace_targets = utils.first_true(
          [namespace_targets, config.get("canonical")], None
      )
      api = utils.first_true([api, config.get("api", None)], None)
      version = utils.first_true([version, config.get("bel_version", None)], None)
  
      print("------------------------------")
      print("BEL version: {}".format(version))
      print("API Endpoint: {}".format(api))
      print("------------------------------")
  
      bo = BEL(version=version, endpoint=api)
      bo.parse(statement).canonicalize(namespace_targets=namespace_targets)
  
      if bo.ast is None:
          print(bo.original_bel_stmt)
          print(bo.parse_visualize_error)
          print(bo.validation_messages)
      else:
          print("ORIGINAL ", bo.original_bel_stmt)
          print("CANONICAL", bo.ast)
          if bo.validation_messages:
              print(bo.validation_messages)
          else:
              print("No problems found")
      return