code: @Nullable
    Value extractField(@Nonnull FieldPath fieldPath) {
      Value value = null;
  
      if (fields != null) {
        Iterator<String> components = fieldPath.getSegments().iterator();
        value = fields.get(components.next());
  
        while (value != null && components.hasNext()) {
          if (value.getValueTypeCase() != Value.ValueTypeCase.MAP_VALUE) {
            return null;
          }
          value = value.getMapValue().getFieldsOrDefault(components.next(), null);
        }
      }
  
      return value;
    }
docs: Returns the Value Proto at 'fieldPath'. Returns null if the field was not found.