def copy_directory_structure(destination_directory, relative_path):
    """Create all the intermediate directories required for relative_path to exist within destination_directory.
    This assumes that relative_path is a directory located within root_dir.

    Examples:
        destination_directory: /tmp/destination
        relative_path: test/unit/

        will create:  /tmp/destination/test/unit

    Args:
        destination_directory (str): root of the destination directory where the directory structure will be created.
        relative_path (str): relative path that will be created within destination_directory
    """
    full_path = os.path.join(destination_directory, relative_path)
    if os.path.exists(full_path):
        return

    os.makedirs(destination_directory, relative_path)
def copy_directory_structure ( destination_directory , relative_path ) : full_path = os . path . join ( destination_directory , relative_path ) if os . path . exists ( full_path ) : return os . makedirs ( destination_directory , relative_path )
Create all the intermediate directories required for relative_path to exist within destination_directory.
    This assumes that relative_path is a directory located within root_dir.

    Examples:
        destination_directory: /tmp/destination
        relative_path: test/unit/

        will create:  /tmp/destination/test/unit

    Args:
        destination_directory (str): root of the destination directory where the directory structure will be created.
        relative_path (str): relative path that will be created within destination_directory