code: def test_arg_names(pass_to_super: bool):
      """Test that the `_arg_names` can be determined programmatically when the args aren't passed to
      `super().__init__(space, **kwargs)`.
  
      Also checks that the auto-generated configuration dict acts the same way.
      """
  
      class SomeAlgo(BaseAlgorithm):
          def __init__(self, space, foo: int = 123, bar: str = "heyo"):
              if pass_to_super:
                  super().__init__(space, foo=foo, bar=bar)
              else:
                  super().__init__(space)
                  self.foo = foo
                  self.bar = bar
              # Param names should be correct, either way.
              assert self._param_names == ["foo", "bar"]
              # Attributes should be set correctly either way:
              assert self.foo == foo
              assert self.bar == bar
  
      space = Space(x=Real("yolo1", "uniform", 1, 4))
      algo = SomeAlgo(space, foo=111, bar="barry")
      assert algo.configuration == {
          "somealgo": {
              "bar": "barry",
              "foo": 111,
          }
      }
  
file_path: orion/tests/unittests/algo/test_base.py
imports: import pytest
  from orion.algo.base import BaseAlgorithm
  from orion.algo.space import Integer, Real, Space
  from orion.core.utils import backward, format_trials
label_desc: Use image node_id 6 for calling a global function with example usage: test_arg_names(pass_to_super) without return types