def __init__(self, cache_element=None, pickle_protocol=(- 1)):
    '\n        Initialize a new in-memory descriptor index, or reload one from a\n        cache.\n\n        :param cache_element: Optional data element cache, loading an existing\n            index if the element has bytes. If the given element is writable,\n             new descriptors added to this index are cached to the element.\n        :type cache_element: None | smqtk.representation.DataElement\n\n        :param pickle_protocol: Pickling protocol to use when serializing index\n            table to the optionally provided, writable cache element. We will\n            use -1 by default (latest version, probably a binary form).\n        :type pickle_protocol: int\n\n        '
    super(MemoryDescriptorIndex, self).__init__()
    self._table = {}
    self.cache_element = cache_element
    self.pickle_protocol = pickle_protocol
    if (cache_element and (not cache_element.is_empty())):
        self._log.debug('Loading cached descriptor index table from %s element.', cache_element.__class__.__name__)
        self._table = pickle.loads(cache_element.get_bytes())
Initialize a new in-memory descriptor index, or reload one from a
cache.

:param cache_element: Optional data element cache, loading an existing
    index if the element has bytes. If the given element is writable,
     new descriptors added to this index are cached to the element.
:type cache_element: None | smqtk.representation.DataElement

:param pickle_protocol: Pickling protocol to use when serializing index
    table to the optionally provided, writable cache element. We will
    use -1 by default (latest version, probably a binary form).
:type pickle_protocol: int
def __init__(self, cache_element=None, pickle_protocol=(- 1)):
    '\n        Initialize a new in-memory descriptor index, or reload one from a\n        cache.\n\n        :param cache_element: Optional data element cache, loading an existing\n            index if the element has bytes. If the given element is writable,\n             new descriptors added to this index are cached to the element.\n        :type cache_element: None | smqtk.representation.DataElement\n\n        :param pickle_protocol: Pickling protocol to use when serializing index\n            table to the optionally provided, writable cache element. We will\n            use -1 by default (latest version, probably a binary form).\n        :type pickle_protocol: int\n\n        '
    super(MemoryDescriptorIndex, self).__init__()
    self._table = {}
    self.cache_element = cache_element
    self.pickle_protocol = pickle_protocol
    if (cache_element and (not cache_element.is_empty())):
        self._log.debug('Loading cached descriptor index table from %s element.', cache_element.__class__.__name__)
        self._table = pickle.loads(cache_element.get_bytes())