code: def sync(self, videoQuality, client=None, clientId=None, limit=None, unwatched=False, title=None):
          
  
          from plexapi.sync import SyncItem, Policy, MediaSettings
  
          myplex = self._server.myPlexAccount()
          sync_item = SyncItem(self._server, None)
          sync_item.title = title if title else self._defaultSyncTitle()
          sync_item.rootTitle = self.title
          sync_item.contentType = self.listType
          sync_item.metadataType = self.METADATA_TYPE
          sync_item.machineIdentifier = self._server.machineIdentifier
  
          section = self._server.library.sectionByID(self.librarySectionID)
  
          sync_item.location = 'library://%s/item/%s' % (section.uuid, quote_plus(self.key))
          sync_item.policy = Policy.create(limit, unwatched)
          sync_item.mediaSettings = MediaSettings.createVideo(videoQuality)
  
          return myplex.sync(sync_item, client=client, clientId=clientId)
docs: Add current video (movie, tv-show, season or episode) as sync item for specified device.
              See :func:`plexapi.myplex.MyPlexAccount.sync()` for possible exceptions.
  
              Parameters:
                  videoQuality (int): idx of quality of the video, one of VIDEO_QUALITY_* values defined in
                                      :mod:`plexapi.sync` module.
                  client (:class:`plexapi.myplex.MyPlexDevice`): sync destination, see
                                                                 :func:`plexapi.myplex.MyPlexAccount.sync`.
                  clientId (str): sync destination, see :func:`plexapi.myplex.MyPlexAccount.sync`.
                  limit (int): maximum count of items to sync, unlimited if `None`.
                  unwatched (bool): if `True` watched videos wouldn't be synced.
                  title (str): descriptive title for the new :class:`plexapi.sync.SyncItem`, if empty the value would be
                               generated from metadata of current media.
  
              Returns:
                  :class:`plexapi.sync.SyncItem`: an instance of created syncItem.