static fromObject(obj, opts = {}) {
    if (obj == null || typeof obj !== "object") {
      throw new InvalidArgumentError(
        `Duration.fromObject: argument expected to be an object, got ${
          obj === null ? "null" : typeof obj
        }`
      );
    }

    return new Duration({
      values: normalizeObject(obj, Duration.normalizeUnit),
      loc: Locale.fromObject(opts),
      conversionAccuracy: opts.conversionAccuracy,
      matrix: opts.matrix,
    });
  }
Create a Duration from a JavaScript object with keys like 'years' and 'hours'.
If this object is empty then a zero milliseconds duration is returned.
@param {Object} obj - the object to create the DateTime from
@param {number} obj.years
@param {number} obj.quarters
@param {number} obj.months
@param {number} obj.weeks
@param {number} obj.days
@param {number} obj.hours
@param {number} obj.minutes
@param {number} obj.seconds
@param {number} obj.milliseconds
@param {Object} [opts=[]] - options for creating this Duration
@param {string} [opts.locale='en-US'] - the locale to use
@param {string} opts.numberingSystem - the numbering system to use
@param {string} [opts.conversionAccuracy='casual'] - the preset conversion system to use
@param {string} [opts.matrix=Object] - the custom conversion system to use
@return {Duration}