def path_cassette_dirname(vcr_path, cassettes_dirname="vcr_cassettes"):
    """Custom vcr path transformer to nest the cassette under a directory
    /foo/cassette.yaml -> /foo/<cassettes_dirname>/cassette.yaml
    """
    paths = vcr_path.split("/")
    filename = paths.pop()
    vcr_path = "/".join(paths + [cassettes_dirname] + [filename])
    return vcr_path