code: def set_display_name(self, display_name):
          '''
          Set display name of a system independently of upload.
          '''
          if self.config.legacy_upload:
              return self._legacy_set_display_name(display_name)
  
          system = self._fetch_system_by_machine_id()
          if not system:
              return system
          inventory_id = system[0]['id']
          req_url = self.base_url + '/inventory/v1/hosts/' + inventory_id
          try:
              net_logger.info("PATCH %s", req_url)
              res = self.session.patch(req_url, json={'display_name': display_name})
          except (requests.ConnectionError, requests.Timeout) as e:
              logger.error(e)
              logger.error('The Insights API could not be reached.')
              return False
          if (self.handle_fail_rcs(res)):
              logger.error('Could not update display name.')
              return False
          logger.info('Display name updated to ' + display_name + '.')
          return Truf set_display_name(self, display_name):
          '''
          Set display name of a system independently of upload.
          '''
          if self.config.legacy_upload:
              return self._legacy_set_display_name(display_name)
  
          system = self._fetch_system_by_machine_id()
          if not system:
              return system
          inventory_id = system[0]['id']
          req_url = self.base_url + '/inventory/v1/hosts/' + inventory_id
          try:
              net_logger.info("PATCH %s", req_url)
              res = self.session.patch(req_url, json={'display_name': display_name})
          except (requests.ConnectionError, requests.Timeout) as e:
              logger.error(e)
              logger.error('The Insights API could not be reached.')
              return False
          if (self.handle_fail_rcs(res)):
              logger.error('Could not update display name.')
              return False
          logger.info('Display name updated to ' + display_name + '.')
          return True
docs: Set display name of a system independently of upload.