'Write the class doc to `f`.
Args:
f: File to write to.
prefix: Prefix for names.
cls: class object.
name: name to use.'

def _write_class_markdown_to_file(self, f, name, cls):

    methods = dict(self.get_class_members(name, cls))
    num_methods = len(methods)
    try:
        self._write_docstring_markdown_to_file(f, '####', inspect.getdoc(cls), methods, {})
    except ValueError as e:
        raise ValueError((str(e) + ('    in    class    `%s`' % cls.__name__)))
    any_method_called_out = (len(methods) != num_methods)
    if any_method_called_out:
        other_methods = {n: m for (n, m) in methods.items() if (n in cls.__dict__)}
        if other_methods:
            print('\n####    Other    Methods', file=f)
    else:
        other_methods = methods
    for name in sorted(other_methods):
        self._write_member_markdown_to_file(f, '####', *other_methods[name])
