'get_microdescriptors(default = UNDEFINED)
Provides an iterator for all of the microdescriptors that tor currently
knows about.
**Tor does not expose this information via the control protocol**
(:trac:`8323`). Until it does this reads the microdescriptors from disk,
and hence won\'t work remotely or if we lack read permissions.
:param list default: items to provide if the query fails
:returns: iterates over
:class:`~stem.descriptor.microdescriptor.Microdescriptor` for relays in
the tor network
:raises: :class:`stem.ControllerError` if unable to query tor and no
default was provided'

@with_default(yields=True)
def get_microdescriptors(self, default=UNDEFINED):

    try:
        data_directory = self.get_conf('DataDirectory')
    except stem.ControllerError as exc:
        raise stem.OperationFailed(message=('Unable    to    determine    the    data    directory    (%s)' % exc))
    cached_descriptor_path = os.path.join(data_directory, 'cached-microdescs')
    if (not os.path.exists(data_directory)):
        raise stem.OperationFailed(message=("Data    directory    reported    by    tor    doesn't    exist    (%s)" % data_directory))
    elif (not os.path.exists(cached_descriptor_path)):
        raise stem.OperationFailed(message=("Data    directory    doens't    contain    cached    microescriptors    (%s)" % cached_descriptor_path))
    with stem.descriptor.reader.DescriptorReader([cached_descriptor_path]) as reader:
        for desc in reader:
            if (not isinstance(desc, stem.descriptor.microdescriptor.Microdescriptor)):
                raise stem.OperationFailed(message=('BUG:    Descriptor    reader    provided    non-microdescriptor    content    (%s)' % type(desc)))
            (yield desc)
