<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def splitext(path):
 # type: (Text) -> Tuple[Text, Text] """Split the extension from the path. Arguments: path (str):
 A path to split. Returns: (str, str):
 A tuple containing the path and the extension. Example: ('baz', '.txt') ('foo/bar/baz', '.txt') ('foo/bar/.foo', '') """

    parent_path, pathname = split(path)
    if pathname.startswith(".") and pathname.count(".") == 1:
        return path, ""
    if "." not in pathname:
        return path, ""
    pathname, ext = pathname.rsplit(".", 1)
    path = join(parent_path, pathname)
    return path, "." + ext