code: public static DataValue derivedValue(DataValue from, TimestampsToReturn timestamps) {
          boolean includeSource = timestamps == TimestampsToReturn.Source || timestamps == TimestampsToReturn.Both;
          boolean includeServer = timestamps == TimestampsToReturn.Server || timestamps == TimestampsToReturn.Both;
  
          return new DataValue(
                  from.value,
                  from.status,
                  includeSource ? from.sourceTime : null,
                  includeServer ? from.serverTime : null
          );
      }
docs: Derive a new {@link DataValue} from a given {@link DataValue}.
  
  @param from       the {@link DataValue} to derive from.
  @param timestamps the timestamps to return in the derived value.
  @return a derived {@link DataValue}.