<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def Managed(cls, manager, field, items):
 """Create a custom `ObjectSet` that is managed by a related `Object.` :param manager: The manager of the `ObjectSet`. This is the `Object` that manages this set of objects. :param field: The field on the `manager` that created this managed `ObjectSet`. :param items: The items in the `ObjectSet`. """

        attrs = {
            "_manager": manager,
            "_manager_field": field,
        }
        if hasattr(cls, "create"):
            attrs['create'] = ManagedCreate(cls)
        cls = type(
            "%s.Managed#%s" % (
                cls.__name__, manager.__class__.__name__), (cls,), attrs)
        return cls(items)