code: def id(self): # pylint: disable=invalid-name,too-many-branches,too-many-return-statements
          
          # There are some times we want to trick the platform detection
          # say if a raspberry pi doesn't have the right ID, or for testing
          try:
              return os.environ['BLINKA_FORCECHIP']
          except KeyError: # no forced chip, continue with testing!
              pass
  
          # Special case, if we have an environment var set, we could use FT232H
          try:
              if os.environ['BLINKA_FT232H']:
                  # we can't have ftdi1 as a dependency cause its wierd
                  # to install, sigh.
                  import ftdi1 as ftdi # pylint: disable=import-error
                  try:
                      ctx = None
                      ctx = ftdi.new()  # Create a libftdi context.
                      # Enumerate FTDI devices.
                      count, _ = ftdi.usb_find_all(ctx, 0, 0)
                      if count < 0:
                          raise RuntimeError('ftdi_usb_find_all returned error %d : %s' %
                                             count, ftdi.get_error_string(self._ctx))
                      if count == 0:
                          raise RuntimeError('BLINKA_FT232H environment variable' + \
                                             'set, but no FT232H device found')
                  finally:
                      # Make sure to clean up list and context when done.
                      if ctx is not None:
                          ftdi.free(ctx)
              return FT232H
          except KeyError: # no FT232H environment var
              pass
  
          platform = sys.platform
          if platform == "linux" or platform == "linux2":
              return self._linux_id()
          if platform == "esp8266":
              return ESP8266
          if platform == "samd21":
              return SAMD21
          if platform == "pyboard":
              return STM32
          # nothing found!
          return None
docs: Return a unique id for the detected chip, if any.