def menu(self, name, **kwargs):
        """Defined an :class:`Object` property that is displayed as a menu.

        .. note::
            Can be used for an :class:`Button` type with properties whose views are one of
            :class:`Button`, :class:`Dropdown`, :class:`DropdownView`, and :class;`Choices`. The variant
            and color of the items can be set using the `variant` and `color` parameters.

        Args:
            name: the name of the property
            variant (None): the variant for the items of the menu. Can be ``"contained"``,
                ``"outlined"``, ``"round"`` or ``"square"``
            color (None): the color for the items of the menu.
            overlay (None): whether to display the menu as an overlay. Can be ``"top-left"``,
            ``"top-center"``, ``"top-right"``, ``"bottom-left"``, `"bottom-center"``, or
            ``"bottom-right"``. Overlay is useful when you want to display a floating menu on top of
            another content (for example, menu for full-panel-width plot)
            icon (None): when set, the icon will be displayed as the menu button instead of the label.
            Can be "SettingsIcon", "MoreVertIcon".

        Returns:
            a :class:`Object`
        """
        menu_kwargs = {"pad": 1, "variant": "square", **kwargs}
        menu = MenuView(**menu_kwargs)
        obj = Object()
        self.define_property(name, obj, view=menu)
        return obj
Defined an :class:`Object` property that is displayed as a menu.

        .. note::
            Can be used for an :class:`Button` type with properties whose views are one of
            :class:`Button`, :class:`Dropdown`, :class:`DropdownView`, and :class;`Choices`. The variant
            and color of the items can be set using the `variant` and `color` parameters.

        Args:
            name: the name of the property
            variant (None): the variant for the items of the menu. Can be ``"contained"``,
                ``"outlined"``, ``"round"`` or ``"square"``
            color (None): the color for the items of the menu.
            overlay (None): whether to display the menu as an overlay. Can be ``"top-left"``,
            ``"top-center"``, ``"top-right"``, ``"bottom-left"``, `"bottom-center"``, or
            ``"bottom-right"``. Overlay is useful when you want to display a floating menu on top of
            another content (for example, menu for full-panel-width plot)
            icon (None): when set, the icon will be displayed as the menu button instead of the label.
            Can be "SettingsIcon", "MoreVertIcon".

        Returns:
            a :class:`Object`
        
fiftyone/operators/types.py