code: def copy_resource_dir(src, dest):
      
      package_name = "mocha"
      dest = (dest + "/" + os.path.basename(src)).rstrip("/")
      if pkg_resources.resource_isdir(package_name, src):
          if not os.path.isdir(dest):
              os.makedirs(dest)
          for res in pkg_resources.resource_listdir(__name__, src):
              copy_resource_dir(src + "/" + res, dest)
      else:
          if not os.path.isfile(dest) and os.path.splitext(src)[1] not in [".pyc"]:
              copy_resource_file(src, dest)
docs: To copy package data directory to destination