code: def test_dilate():
      x = torch.zeros((1, 1, 3, 3))
      x[..., 1, 1] = 1
      expected = torch.ones((1, 1, 3, 3))
      out = dilate(x, 3)
      assert torch.equal(out, expected)
  
file_path: doctr/tests/pytorch/test_models_detection_pt.py
imports: import os
  import tempfile
  import numpy
  import onnxruntime
  import pytest
  import torch
  from doctr.file_utils import CLASS_NAME
  from doctr.models import detection
  from doctr.models.detection._utils import dilate, erode
  from doctr.models.detection.predictor import DetectionPredictor
  from doctr.models.utils import export_model_to_onnx
label_desc: Use image node_id 4 for calling a global function with example usage: test_dilate() without return types