code: def basename(path, extension_marker="."):
      
      result = os.path.basename(path or "")
      if extension_marker:
          pre, _, post = result.rpartition(extension_marker)
          return pre or post
  
      return result
docs: :param str|None path: Path to consider
      :param str|None extension_marker: Trim file extension based on specified character
      :return str: Basename part of path, without extension (if 'extension_marker' provided)