code: def test_closest_valid_dtype(
      *, input_dtype, test_flags, backend_fw, fn_name, on_device
  ):
      with BackendHandler.update_backend(backend_fw) as ivy_backend:
          input_dtype = input_dtype[0]
          res = ivy_backend.closest_valid_dtype(input_dtype)
          assert isinstance(input_dtype, (ivy_backend.Dtype, str))
          assert isinstance(
              res, (ivy_backend.Dtype, str)
          ), f"result={res!r}, but should be str or ivy.Dtype"
  
imports: import numpy
  from hypothesis import strategies
  import typing
  import ivy
  import ivy_tests.test_ivy.helpers
  from ivy_tests.test_ivy.helpers import handle_test, BackendHandler
label_desc: Use image node_id 14 for calling a global function with example usage: test_closest_valid_dtype() without return types