code: def test_wrong_callback(self):
      x0 = torch.tensor([1.0, 2.0])
      t = torch.tensor([0.0, 1.0])
  
      for method in FIXED_METHODS:
          for callback_name in (
              "callback_accept_step",
              "callback_reject_step",
          ):
              with self.subTest(method=method):
                  f = _NeuralF(width=10, oscillate=False)
                  setattr(f, callback_name, lambda t0, y0, dt: None)
                  with self.assertWarns(Warning):
                      torchdiffeq.odeint(f, x0, t, method=method)
  
      for method in SCIPY_METHODS:
          for callback_name in (
              "callback_step",
              "callback_accept_step",
              "callback_reject_step",
          ):
              with self.subTest(method=method):
                  f = _NeuralF(width=10, oscillate=False)
                  setattr(f, callback_name, lambda t0, y0, dt: None)
                  with self.assertWarns(Warning):
                      torchdiffeq.odeint(f, x0, t, method=method)
  
imports: from functools import partial
  import unittest
  import warnings
  import torch
  import torchdiffeq
  from problems import construct_problem, PROBLEMS, DTYPES, DEVICES, METHODS, ADAPTIVE_METHODS, FIXED_METHODS, SCIPY_METHODS
label_desc: Use image node_id 1 for calling the TestCallbacks obj's underlying member method code with example usage: obj.test_wrong_callback() without return types