def METHOD_NAME(example_case: ExportCase):
    """
    Generates the .rst files for all the examples in db/examples/
    """
    model = example_case.model
    tags = ", ".join(f":doc:`{tag} <{tag}>`" for tag in example_case.tags)
    source_file = (
        inspect.getfile(model.__class__)
        if isinstance(model, torch.nn.Module)
        else inspect.getfile(model)
    )
    with open(source_file) as file:
        source_code = file.read()
    source_code = re.sub(r"from torch\._export\.db\.case import .*\n", "", source_code)
    source_code = re.sub(r"@export_case\((.|\n)*?\)\n", "", source_code)
    source_code = source_code.replace("\n", "\n    ")
    splitted_source_code = re.split(r"@export_rewrite_case.*\n", source_code)
    assert len(splitted_source_code) in {
        1,
        2,
    }, f"more than one @export_rewrite_case decorator in {source_code}"
    # Generate contents of the .rst file
    title = f"{example_case.name}"
    doc_contents = f"""{title}