def _create_typed_object_meta(get_fset):
    def _get_fget(attr, private_attr, type_):
        def _fget(self):
            try:
                return getattr(self, private_attr)
            except AttributeError:
                raise AttributeError(
                    "'{}' object has no attribute '{}'".format(
                        _get_type_name(type_), attr
                    )
                )
        return _fget
    class _AnnotatedObjectMeta(type):
        def __new__(
            mcs,
            name,
            bases,
            attrs,
            **kwargs
        ):
            annotations = attrs.get("__annotations__", {})
            use_comment_type_hints = (
                not annotations and attrs.get("__module__") != __name__
            )
            if use_comment_type_hints:
                frame_source = _get_class_frame_source(name)
                annotations = get_type_hints(*frame_source)
            names = list(attrs) + list(annotations)
            typed_attrs = {}
            for attr in names:
                typed_attrs[attr] = attrs.get(attr)
                if _is_propertyable(names, attrs, annotations, attr):
                    private_attr = "__{}".format(attr)
                    if attr in attrs:
                        typed_attrs[private_attr] = attrs[attr]
                    type_ = (
                        Optional[annotations[attr]]
                        if not use_comment_type_hints
                        and attr in attrs
                        and attrs[attr] is None
                        else annotations[attr]
                    )
                    typed_attrs[attr] = property(
                        _get_fget(attr, private_attr, type_),
                        get_fset(attr, private_attr, type_),
                    )
            properties = [
                attr
                for attr in annotations
                if _is_propertyable(names, attrs, annotations, attr)
            ]
            typed_attrs["_tp__typed_properties"] = properties
            typed_attrs["_tp__required_typed_properties"] = [
                attr
                for attr in properties
                if (
                    attr not in attrs
                    or attrs[attr] is None
                    and use_comment_type_hints
                )
                and NoneType not in getattr(annotations[attr], "__args__", ())
            ]
            return super(_AnnotatedObjectMeta, mcs).__new__(
                mcs, name, bases, typed_attrs, **kwargs
            )
    return _AnnotatedObjectMeta