code: def assert_shapes_and_dtypes(tensors, shapes, dtypes):
      if isinstance(tensors, torch.Tensor):
          assert tensors.shape == shapes
          assert tensors.dtype == dtypes
      else:
          for tensor, shape, dtype in zip(tensors, shapes, dtypes):
              assert_shapes_and_dtypes(tensor, shape, dtype)
  
file_path: gluonts/test/torch/model/test_modules.py
imports: import pytest
  import torch
  from gluonts.torch.distributions import QuantileOutput
  from gluonts.torch.model.deepar import DeepARModel
  from gluonts.torch.model.mqf2 import MQF2MultiHorizonModel
  from gluonts.torch.model.simple_feedforward import SimpleFeedForwardModel
  from gluonts.torch.model.tft import TemporalFusionTransformerModel
label_desc: Use image node_id 1 for calling a global function with example usage: assert_shapes_and_dtypes(tensors, shapes, dtypes) without return types