This method runs the refactoring on all the Protobuf files in the
    Dropsonde repo.

    Args:
        dest_dir (str): directory where the Protobuf files lives.
        namespace (str): the desired package name (i.e. "dropsonde.py2")
        namespace_path (str): the desired path corresponding to the package
                              name (i.e. "dropsonde/py2")

def proto_refactor_files(dest_dir, namespace, namespace_path):
    """This method runs the refactoring on all the Protobuf files in the
    Dropsonde repo.

    Args:
        dest_dir (str): directory where the Protobuf files lives.
        namespace (str): the desired package name (i.e. "dropsonde.py2")
        namespace_path (str): the desired path corresponding to the package
                              name (i.e. "dropsonde/py2")
    """
    for dn, dns, fns in os.walk(dest_dir):
        for fn in fns:
            fn = os.path.join(dn, fn)
            if fnmatch.fnmatch(fn, '*.proto'):
                data = proto_refactor(fn, namespace, namespace_path)
                with open(fn, 'w') as f:
                    f.write(data)