code: def _check_same_shape(preds, targets):
      if preds.shape != targets.shape:
          raise RuntimeError(
              "preds and targets are expected to have the same shape"
          )
  
imports: import torch
  from abc import ABC, abstractmethod
label_desc: Use image node_id 2 for calling a global function with example usage: _check_same_shape(preds, targets) without return types