code: def _make_resource_result(f, futmap):
          
          try:
              result = f.result()
              for resource, configs in result.items():
                  fut = futmap.get(resource, None)
                  if fut is None:
                      raise RuntimeError("Resource {} not found in future-map: {}".format(resource, futmap))
                  if resource.error is not None:
                      # Resource-level exception
                      fut.set_exception(KafkaException(resource.error))
                  else:
                      # Resource-level success
                      # configs will be a dict for describe_configs()
                      # and None for alter_configs()
                      fut.set_result(configs)
          except Exception as e:
              # Request-level exception, raise the same for all resources
              for resource, fut in futmap.items():
                  fut.set_exception(e)
docs: Map per-resource results to per-resource futures in futmap.
          The result value of each (successful) future is a ConfigResource.