code: def test_parse_float(self):
      doc = """
                val=0.1
                biggest1=inf
                biggest2=+inf
                smallest=-inf
                notnum1=nan
                notnum2=-nan
                notnum3=+nan
                """
      obj = tomllib.loads(doc, parse_float=D)
      expected = {
          "val": D("0.1"),
          "biggest1": D("inf"),
          "biggest2": D("inf"),
          "smallest": D("-inf"),
          "notnum1": D("nan"),
          "notnum2": D("-nan"),
          "notnum3": D("nan"),
      }
      for k, expected_val in expected.items():
          actual_val = obj[k]
          self.assertIsInstance(actual_val, D)
          if actual_val.is_nan():
              self.assertTrue(expected_val.is_nan())
          else:
              self.assertEqual(actual_val, expected_val)
  
file_path: cpython/Lib/test/test_tomllib/test_misc.py
imports: import copy
  import datetime
  from decimal import Decimal
  from pathlib import Path
  import sys
  import tempfile
  import unittest
  from test import support
  from .None import tomllib
label_desc: Use image node_id 3 for calling the TestMiscellaneous obj's underlying member method code with example usage: obj.test_parse_float() without return types