public object GetValue(CodeContext context, object instance) { object value; if (TryGetValue(context, instance, DynamicHelpers.GetPythonType(instance), out value)) { return value; } throw new InvalidOperationException("cannot get field"); }