code: def test_to_device(self):
      report = self._build_report()
      self.assertFalse(report.a.is_cuda)
      self.assertFalse(report.scores.is_cuda)
  
      report = report.to("cuda")
  
      self.assertTrue(report.a.is_cuda)
      self.assertTrue(report.scores.is_cuda)
  
      report = report.to("cpu", non_blocking=False)
  
      self.assertFalse(report.a.is_cuda)
      self.assertFalse(report.scores.is_cuda)
  
      report = report.to("cuda", fields=["scores"])
  
      self.assertFalse(report.a.is_cuda)
      self.assertTrue(report.scores.is_cuda)
  
file_path: mmf/tests/common/test_report.py
imports: import unittest
  import tests.test_utils
  import torch
  from mmf.common.report import Report
  from mmf.common.sample import SampleList
label_desc: Use image node_id 4 for calling the TestReport obj's underlying member method code with example usage: obj.test_to_device() without return types