async def patch(self,body: ItemActivity, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[ItemActivity]:
        """
        Update the navigation property activities in groups
        param body: The request body
        param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
        Returns: Optional[ItemActivity]
        """
        if body is None:
            raise TypeError("body cannot be null.")
        request_info = self.to_patch_request_information(
            body, request_configuration
        )
        from ..........models.o_data_errors.o_data_error import ODataError

        error_mapping: dict[str, type[ParsableFactory]] = {
            "XXX": ODataError,
        }
        if not self.request_adapter:
            raise Exception("Http core is null") 
        from ..........models.item_activity import ItemActivity

        return await self.request_adapter.send_async(request_info, ItemActivity, error_mapping)

        Update the navigation property activities in groups
        param body: The request body
        param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
        Returns: Optional[ItemActivity]
        
msgraph/generated/groups/item/sites/item/analytics/item_activity_stats/item/activities/item/item_activity_item_request_builder.py