docstr: Returns the title for the current page.
  
  Before calling `read_source()`, this value is empty. It can also be updated by `render()`.
  
  Check these in order and use the first that returns a valid title:
  - value provided on init (passed in from config)
  - value of metadata 'title'
  - content of the first H1 in Markdown content
  - convert filename to title
code: def title(self) -> str | None:  # type: ignore[override]
      """
      Returns the title for the current page.
  
      Before calling `read_source()`, this value is empty. It can also be updated by `render()`.
  
      Check these in order and use the first that returns a valid title:
      - value provided on init (passed in from config)
      - value of metadata 'title'
      - content of the first H1 in Markdown content
      - convert filename to title
      """
      if self.markdown is None:
          return None
  
      if "title" in self.meta:
          return self.meta["title"]
  
      if self._title_from_render:
          return self._title_from_render
      elif (
          self.content is None
      ):  # Preserve legacy behavior only for edge cases in plugins.
          title_from_md = get_markdown_title(self.markdown)
          if title_from_md is not None:
              return title_from_md
  
      if self.is_homepage:
          return "Home"
  
      title = self.file.name.replace("-", " ").replace("_", " ")
      # Capitalize if the filename was all lowercase, otherwise leave it as-is.
      if title.lower() == title:
          title = title.capitalize()
      return title
  
imports: from __future__ import annotations
  import copy
  import enum
  import logging
  import posixpath
  import warnings
  from typing import TYPE_CHECKING, Any, Callable, Iterator, MutableMapping, Sequence
  from urllib.parse import unquote
  from urllib.parse import urljoin, urlsplit, urlunsplit
  import markdown
  import markdown.htmlparser
  import markdown.postprocessors
  import markdown.treeprocessors
  from markdown.util import AMP_SUBSTITUTE
  from mkdocs import utils
  from mkdocs.structure import StructureItem
  from mkdocs.structure.toc import get_toc
  from mkdocs.utils import _removesuffix, get_build_date, get_markdown_title, meta, weak_property
label_desc: Use image node_id 13 for calling the Page obj's underlying member method code with example usage: obj.title() and returns: title, None, self, self, str, title_from_md