(filepath, mode)
If writing ``filepath`` to a directory that doesn't exist, all intermediate
    directories will be created as needed.
If writing ``filepath`` to a directory that doesn't exist, all intermediate
    directories will be created as needed.
If writing filepath to a directory that doesn t exist all intermediate directories will be created as needed .
def _make_dirs(filepath, mode):
    """
    If writing ``filepath`` to a directory that doesn't exist, all intermediate
    directories will be created as needed.
    """
    parent = filepath.parent
    if "w" in mode and parent:
        os.makedirs(parent, exist_ok=True)
def _make_dirs ( filepath , mode ) : parent = filepath . parent if "w" in mode and parent : os . makedirs ( parent , exist_ok = True )