def METHOD_NAME(module, do=True):
    doc_name = 'relstorage.%s' % module
    rst_filename = doc_name + '.rst'
    exists = os.path.exists(rst_filename)
    if exists:
        autogenerated = 'autogenerated' in _read(rst_filename, 200).lower()
        if not autogenerated:
            return doc_name
    if '.' in module:
        m = __import__('relstorage.%s' % module, fromlist=['chicken'])
    else:
        m = __import__('relstorage.%s' % module)
        m = getattr(m, module)
    title = getattr(m, '__doc__', None)
    if title:
        lines = title.strip().splitlines()
        for line in lines:
            # skip leading blanks. Support both styles of docstrings.
            if line:
                title = line.strip()
                break
        title = title.strip(' .')
    prefix = ':mod:`relstorage.%s`' % module
    if title:
        title = prefix + ' -- %s' % (title, )
    else:
        title = prefix
    title_underline = '=' * len(title) # pylint:disable=possibly-unused-variable
    params = globals().copy()
    params.update(locals())
    result = template % params
    if getattr(m, '_no_undoc_members', True):
        result = '\n'.join(result.splitlines()[:-1])
    if exists:
        if _read(rst_filename, len(result) + 1) == result:
            return doc_name # already exists one which is the same
    if do:
        print('Generated %s from %s' % (rst_filename, m.__file__))
        with open(rst_filename, 'w') as f:
            f.write(result)
    else:
        print('Would generate %s from %s' % (rst_filename, m.__file__))
    return doc_name