<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def basename(path: Optional[str]) -> Optional[str]: """ Returns the final component of a pathname and None if the argument is None """

    if path is not None:
        return os.path.basename(path)