code: def test_distribution_to_json() -> None:
      for key in EXAMPLE_JSONS:
          json_actual = json.loads(
              distributions.distribution_to_json(
                  EXAMPLE_DISTRIBUTIONS[key]
              )
          )
          json_expect = json.loads(EXAMPLE_JSONS[key])
          if (
              json_expect["name"] == "IntDistribution"
              and "step" not in json_expect["attributes"]
          ):
              json_expect["attributes"]["step"] = 1
          if (
              json_expect["name"] == "IntDistribution"
              and "log" not in json_expect["attributes"]
          ):
              json_expect["attributes"]["log"] = False
          assert json_actual == json_expect
  
imports: import copy
  import json
  from typing import Any
  from typing import cast
  from typing import Dict
  from typing import Optional
  import warnings
  import numpy
  import pytest
  from optuna import distributions
label_desc: Use image node_id 3 for calling a global function with example usage: test_distribution_to_json() without return types