code: def get_name(default: str = 'no name set'):
      
      try:
          with open('/etc/machine-info') as emi:
              contents = emi.read()
      except OSError:
          LOG.exception(
              "Couldn't read /etc/machine-info")
          contents = ''
      for line in contents.split('\n'):
          if line.startswith('PRETTY_HOSTNAME='):
              return '='.join(line.split('=')[1:])
      LOG.warning(f"No PRETTY_HOSTNAME in {contents}, defaulting to {default}")
      try:
          _update_pretty_hostname(default)
      except OSError:
          LOG.exception("Could not write new pretty hostname!")
      return default
docs: Get the currently-configured name of the machine