docs: public static Deferred<Leaf> parseFromStorage(final TSDB tsdb, 
        final KeyValue column, final boolean load_uids) {
      if (column.value() == null) {
        throw new IllegalArgumentException("Leaf column value was null");
      }
  
      // qualifier has the TSUID in the format  "leaf:<display_name.hashCode()>"
      // and we should only be here if the qualifier matched on "leaf:"
      final Leaf leaf = JSON.parseToObject(column.value(), Leaf.class);
      
      // if there was an error with the data and the tsuid is missing, dump it
      if (leaf.tsuid == null || leaf.tsuid.isEmpty()) {
        LOG.warn("Invalid leaf object in row: " + Branch.idToString(column.key()));
        return Deferred.fromResult(null);
      }
      
      // if we don't need to load UIDs, then return now
      if (!load_uids) {
        return Deferred.fromResult(leaf);
      }
    
      // split the TSUID to get the tags
      final List<byte[]> parsed_tags = UniqueId.getTagsFromTSUID(leaf.tsuid);
      
      // initialize the with empty objects, otherwise the "set" operations in 
      // the callback won't work.
      final ArrayList<String> tags = new ArrayList<String>(parsed_tags.size());
      for (int i = 0; i < parsed_tags.size(); i++) {
        tags.add("");
      }
      
      // setup an array of deferreds to wait on so we can return the leaf only
      // after all of the name fetches have completed
      final ArrayList<Deferred<Object>> uid_group = 
        new ArrayList<Deferred<Object>>(parsed_tags.size() + 1);
  
      /**
       * Callback executed after the UID name has been retrieved successfully.
       * The {@code index} determines where the result is stored: -1 means metric, 
       * >= 0 means tag
       */
      final class UIDNameCB implements Callback<Object, String> {
        final int index;
        
        public UIDNameCB(final int index) {
          this.index = index;
        }
  
        @Override
        public Object call(final String name) throws Exception {
          if (index < 0) {
            leaf.metric = name;
          } else {
            tags.set(index, name);
          }
          return null;
        }
        
      }
      
      // fetch the metric name first
      final byte[] metric_uid = UniqueId.stringToUid(
          leaf.tsuid.substring(0, TSDB.metrics_width() * 2));
      uid_group.add(tsdb.getUidName(UniqueIdType.METRIC, metric_uid).addCallback(
              new UIDNameCB(-1)));
      
      int idx = 0;
      for (byte[] tag : parsed_tags) {
        if (idx % 2 == 0) {
          uid_group.add(tsdb.getUidName(UniqueIdType.TAGK, tag)
                .addCallback(new UIDNameCB(idx)));
        } else {
          uid_group.add(tsdb.getUidName(UniqueIdType.TAGV, tag)
              .addCallback(new UIDNameCB(idx)));
        }          
        idx++;
      }
  
      /**
       * Called after all of the UID name fetches have completed and parses the
       * tag name/value list into name/value pairs for proper display
       */
      final class CollateUIDsCB implements Callback<Deferred<Leaf>, 
        ArrayList<Object>> {
  
        /**
         * @return A valid Leaf object loaded with UID names
         */
        @Override
        public Deferred<Leaf> call(final ArrayList<Object> name_calls) 
          throws Exception {
          int idx = 0;
          String tagk = "";
          leaf.tags = new HashMap<String, String>(tags.size() / 2);
          for (String name : tags) {
            if (idx % 2 == 0) {
              tagk = name;
            } else {
              leaf.tags.put(tagk, name);
            }
            idx++;
          }
          return Deferred.fromResult(leaf);
        }
        
      }
      
      // wait for all of the UID name fetches in the group to complete before
      // returning the leaf
      return Deferred.group(uid_group).addCallbackDeferring(new CollateUIDsCB());    
    }