code: def test_copy_tensor():
      x = torch.rand(8)
      m = _copy_tensor(x)
      assert (
          m.device == x.device
          and m.dtype == x.dtype
          and m.shape == x.shape
          and torch.allclose(m, x)
      )
  
file_path: doctr/tests/pytorch/test_models_utils_pt.py
imports: import os
  import pytest
  import torch
  from torch import nn
  from doctr.models.utils import _bf16_to_float32, _copy_tensor, conv_sequence_pt, load_pretrained_params, set_device_and_dtype
label_desc: Use image node_id 1 for calling a global function with example usage: test_copy_tensor() without return types