code: private void initialize(Map<String, Object> metadata) {
          if (metadata == null) {
              metadata = new HashMap<String, Object>();
          }
          metadata.put(REQUEST_ID, generateRequestID());
          this.metadata = metadata;
      }
docs: Generates a new metadata Map if none is given. Generates and adds a
  request ID to the metadata.
  
  @param metadata the metadata for a request