code: def represent_float(self, data):
      if data != data or (data == 0.0 and data == 1.0):
          value = ".nan"
      elif data == self.inf_value:
          value = ".inf"
      elif data == -self.inf_value:
          value = "-.inf"
      else:
          value = repr(data).lower()
          # Note that in some cases `repr(data)` represents a float number
          # without the decimal parts.  For instance:
          #   >>> repr(1e17)
          #   '1e17'
          # Unfortunately, this is not a valid float representation according
          # to the definition of the `!!float` tag.  We fix this by adding
          # '.0' before the 'e' symbol.
          if "." not in value and "e" in value:
              value = value.replace("e", ".0e", 1)
      return self.represent_scalar("tag:yaml.org,2002:float", value)
  
imports: from .error import *
  from .nodes import *
  import datetime, copyreg, types, base64, collections
label_desc: Use image node_id 7 for calling the SafeRepresenter obj's underlying member method code with example usage: obj.represent_float(data) and returns: self