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 _resolve_name(self, obj):
      if id(obj) in self.ndarray_names:
          name = self.ndarray_names[id(obj)]
          count = self.name_counter[name]
          self.name_counter[name] += 1
          if count:
              if not self.allow_duplicates:
                  raise ValueError(
                      "multiple shared variables with the name "
                      "`{0}` found".format(name)
                  )
              name = "{0}_{1}".format(name, count + 1)
          return name
      return super(PersistentSharedVariableID, self)._resolve_name(obj)
  
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 2 for calling the PersistentSharedVariableID obj's underlying member method code with example usage: obj._resolve_name(obj) and returns: super, name