docs: def configuration_from_uri(uri, uri_regex):
          """
          returns a configuration object.
          """
          file_path = re.match(uri_regex, uri).groups()[0]
          with open(file_path) as f:
              configuration = pickle.load(f)['configuration']
          configuration = yaml.safe_load(configuration)
          configuration['exporter_options']['resume'] = True
          persistence_state_id = file_path.split(os.path.sep)[-1]
          configuration['exporter_options']['persistence_state_id'] = persistence_state_id
          return configuration