docs: function fromShape(obj, propType, options=null) {
    const declaration = propType[SHAPE];
    if (!(declaration instanceof Declaration)) {
      throw new Error('fromShape called with a non-shape property type');
    }
    const shape = declaration.shape;
    const instance = {};
    const checker = {};
    Object.keys(shape).forEach(key => {
      const type = shape[key];
      if (type[SHAPE] instanceof Reshape) {
        // Add the reshape function to the resulting instance.
        addReshape(instance, key);
        return;
      }
      let value = obj[key];
      if (value === undefined) {
        // The object does not have the declared shape.
        // An error will be returned by PropTypes.shape.
        return;
      }
      if (type[SHAPE] instanceof Declaration) {
        // This is a nested shape type.
        instance[key] = fromShape(value, type);
        return;
      }
      if (checker.toString.call(value) === '[object Function]') {
        // This can be an unbound method: try to bind it.
        value = value.bind(obj);
      }
      instance[key] = value;
    });
    options = options || {};
    if (options.mutable) {
      return instance;
    }
    return deepFreeze(instance);
  }