code: def _maybe_get_default_name(self, name):
          
          if name is None and self.uri.fragment:
              name = self.uri.fragment
          return name
docs: Checks a name and determines whether to use the default name.
  
          :param name: The current name to check.
          :return: Either None or a :class:`str` representing the name.