docstr: Assert that a value is correct within a percent tolerance
docstr_tok: ["Assert","that","a","value","is","correct","within","a","percent","tolerance"]
code: def assert_within_tolerance(
      self,
      expected: float,
      actual: float,
      percent_tolerance: float = 10,
  ) -> None:
      """Assert that a value is correct within a percent tolerance"""
      error = abs(expected - actual)
      tolerance = expected * (percent_tolerance / 100)
      self.assertLess(error, tolerance)
  
imports: import os
  import time
  import unittest
  from datetime import timedelta
  from random import random
  from unittest import mock
  from unittest.mock import Mock, patch
  import torch
  import torch.distributed
  from pyre_extensions import none_throws
  from torchtnt.utils.test_utils import skip_if_not_distributed, skip_if_not_gpu, spawn_multi_process
  from torchtnt.utils.timer import BoundedTimer, FullSyncPeriodicTimer, get_durations_histogram, get_recorded_durations_table, get_synced_durations_histogram, get_timer_summary, log_elapsed_time, logger, Timer
label_desc: Use image node_id 1 for calling the TimerTest obj's underlying member method code with example usage: obj.assert_within_tolerance(expected, actual, percent_tolerance) without return types