docs: def detect_cloud() -> str:
      '''
      Detect the cloud provider where I am running on.
      '''
      # NOTE: Contributions are welcome!
      # Please add other cloud providers such as Rackspace, IBM BlueMix, etc.
      if sys.platform.startswith('linux'):
          # Google Cloud Platform or Amazon AWS (hvm)
          try:
              # AWS Nitro-based instances
              mb = Path('/sys/devices/virtual/dmi/id/board_vendor').read_text().lower()
              if 'amazon' in mb:
                  return 'amazon'
          except IOError:
              pass
          try:
              bios = Path('/sys/devices/virtual/dmi/id/bios_version').read_text().lower()
              if 'google' in bios:
                  return 'google'
              if 'amazon' in bios:
                  return 'amazon'
          except IOError:
              pass
          # Microsoft Azure
          # https://gallery.technet.microsoft.com/scriptcenter/Detect-Windows-Azure-aed06d51
          # TODO: this only works with Debian/Ubuntu instances.
          # TODO: this does not work inside containers.
          try:
              dhcp = Path('/var/lib/dhcp/dhclient.eth0.leases').read_text()
              if 'unknown-245' in dhcp:
                  return 'azure'
              # alternative method is to read /var/lib/waagent/GoalState.1.xml
              # but it requires sudo privilege.
          except IOError:
              pass
      else:
          log.warning('Cloud detection is implemented for Linux only yet.')
      return None