class_docstr: Uses shared variable names when persisting to zip file.
  
  If a shared variable has a name, this name is used as the name of the
  NPY file inside of the zip file. NumPy arrays that aren't matched to a
  shared variable are persisted as usual (i.e. `array_0`, `array_1`,
  etc.)
  
  :param allow_unnamed: Allow shared variables without a name to be
      persisted. Defaults to ``True``.
  :type allow_unnamed: bool, optional
  
  :param allow_duplicates: Allow multiple shared variables to have the same
      name, in which case they will be numbered e.g. `x`, `x_2`, `x_3`, etc.
      Defaults to ``True``.
  :type allow_duplicates: bool, optional
  
  :raises ValueError
      If an unnamed shared variable is encountered and `allow_unnamed` is
      ``False``, or if two shared variables have the same name, and
      `allow_duplicates` is ``False``.
code: def __init__(
      self, zip_file, allow_unnamed=True, allow_duplicates=True
  ):
      super(PersistentSharedVariableID, self).__init__(zip_file)
      self.name_counter = defaultdict(int)
      self.ndarray_names = {}
      self.allow_unnamed = allow_unnamed
      self.allow_duplicates = allow_duplicates
  
imports: from __future__ import absolute_import, print_function, division
  import numpy
  import os
  import pickle
  import sys
  import tempfile
  import zipfile
  import warnings
  from collections import defaultdict
  from contextlib import closing
  from pickle import HIGHEST_PROTOCOL
  from six import BytesIO
  import theano
  from theano import config
  from theano.compat import PY3
  from six import string_types
  from theano.compile.sharedvalue import SharedVariable
label_desc: Use image node_id 1 to create a new PersistentSharedVariableID object from inherited base classes: PersistentGpuArrayID with example: obj = PersistentSharedVariableID(zip_file, allow_unnamed, allow_duplicates)