docs: def insert_or_merge_entity(self, table_name, entity, timeout=None):
          '''
          Merges an existing entity or inserts a new entity if it does not exist
          in the table. 
  
          If insert_or_merge_entity is used to merge an entity, any properties from 
          the previous entity will be retained if the request does not define or 
          include them.
  
          :param str table_name:
              The name of the table in which to insert or merge the entity.
          :param entity:
              The entity to insert or merge. Could be a dict or an entity object. 
              Must contain a PartitionKey and a RowKey.
          :type entity: dict or :class:`~azure.storage.table.models.Entity`
          :param int timeout:
              The server timeout, expressed in seconds.
          :return: The etag of the entity.
          :rtype: str
          '''
  
          _validate_not_none('table_name', table_name)
          request = _insert_or_merge_entity(entity, self.require_encryption,
                                            self.key_encryption_key)
          request.host_locations = self._get_host_locations()
          request.query['timeout'] = _int_to_str(timeout)
          request.path = _get_entity_path(table_name, entity['PartitionKey'], entity['RowKey'])
  
          return self._perform_request(request, _extract_etag)