def FormatHeaderFromFile(style, source_code_info, proto_name):
    "Format RST header based on special file level title\n\n  Args:\n    style: underline style, e.g. '=', '-'.\n    source_code_info: SourceCodeInfo object.\n    proto_name: If the file_level_comment does not contain a user specified\n      title, use this as page title.\n\n  Returns:\n    RST formatted header, and file level comment without page title strings.\n  "
    anchor = FormatAnchor(FileCrossRefLabel(proto_name))
    stripped_comment = annotations.WithoutAnnotations(StripLeadingSpace('\n'.join(((c + '\n') for c in source_code_info.file_level_comments))))
    formatted_extension = ''
    if (annotations.EXTENSION_ANNOTATION in source_code_info.file_level_annotations):
        extension = source_code_info.file_level_annotations[annotations.EXTENSION_ANNOTATION]
        formatted_extension = FormatExtension(extension)
    if (annotations.DOC_TITLE_ANNOTATION in source_code_info.file_level_annotations):
        return (((anchor + FormatHeader(style, source_code_info.file_level_annotations[annotations.DOC_TITLE_ANNOTATION])) + formatted_extension), stripped_comment)
    return (((anchor + FormatHeader(style, proto_name)) + formatted_extension), stripped_comment)
Format RST header based on special file level title

Args:
  style: underline style, e.g. '=', '-'.
  source_code_info: SourceCodeInfo object.
  proto_name: If the file_level_comment does not contain a user specified
    title, use this as page title.

Returns:
  RST formatted header, and file level comment without page title strings.
def FormatHeaderFromFile(style, source_code_info, proto_name):
    "Format RST header based on special file level title\n\n  Args:\n    style: underline style, e.g. '=', '-'.\n    source_code_info: SourceCodeInfo object.\n    proto_name: If the file_level_comment does not contain a user specified\n      title, use this as page title.\n\n  Returns:\n    RST formatted header, and file level comment without page title strings.\n  "
    anchor = FormatAnchor(FileCrossRefLabel(proto_name))
    stripped_comment = annotations.WithoutAnnotations(StripLeadingSpace('\n'.join(((c + '\n') for c in source_code_info.file_level_comments))))
    formatted_extension = 
    if (annotations.EXTENSION_ANNOTATION in source_code_info.file_level_annotations):
        extension = source_code_info.file_level_annotations[annotations.EXTENSION_ANNOTATION]
        formatted_extension = FormatExtension(extension)
    if (annotations.DOC_TITLE_ANNOTATION in source_code_info.file_level_annotations):
        return (((anchor + FormatHeader(style, source_code_info.file_level_annotations[annotations.DOC_TITLE_ANNOTATION])) + formatted_extension), stripped_comment)
    return (((anchor + FormatHeader(style, proto_name)) + formatted_extension), stripped_comment)