'Memoized plugin preparation.'

def prepare(self):

    assert self.initialized
    if (self._prepared is None):
        try:
            self._initialized.prepare()
        except errors.MisconfigurationError as error:
            logger.debug('Misconfigured    %r:    %s', self, error, exc_info=True)
            self._prepared = error
        except errors.NoInstallationError as error:
            logger.debug('No    installation    (%r):    %s', self, error, exc_info=True)
            self._prepared = error
        except errors.PluginError as error:
            logger.debug('Other    error:(%r):    %s', self, error, exc_info=True)
            self._prepared = error
        else:
            self._prepared = True
    return self._prepared
