def register_delete_dir_handler(handler):
    """Register a handler for delete a directory url.

    :param handler: A deleting function which take a argument of directory url.
                    If ``None``, use the default handler, note the default handler
                    will use libhdfs3 driver.

    """
    global _delete_dir_handler  # pylint: disable=global-statement
    if handler is None:
        _delete_dir_handler = _default_delete_dir_handler
    else:
        _delete_dir_handler = handler
Register a handler for delete a directory url.

    :param handler: A deleting function which take a argument of directory url.
                    If ``None``, use the default handler, note the default handler
                    will use libhdfs3 driver.

    
petastorm/spark/spark_dataset_converter.py