def get_scenarios_picker_type(self, ctx, field_name):
        """
        Determines the scenario picker type for a given field based on its type and distinct values.
        - if the field is of type float, shows custom code mode
        - if the field is boolean, shows checkbox mode
        - if the field has no distinct values, shows empty mode
        - if the field has too many distinct values, shows auto-complete or custom code mode
        - if the field has a manageable number of distinct values, shows checkbox mode

        Returns:
            Tuple[str, Any]: Picker type and corresponding values.
        """
        # Validate field name
        schema = ctx.dataset.get_field_schema(flat=True)
        field = schema.get(field_name)
        if field is None:
            raise ValueError(f"Field {field_name} does not exist")

        # Field type-based selection
        if isinstance(field, fof.FloatField):
            return ShowOptionsMethod.CODE, CustomCodeViewReason.FLOAT_TYPE
        if isinstance(field, fof.BooleanField):
            # example counts {True: 2, None: 135888}
            counts = ctx.dataset.count_values(field_name)
            return ShowOptionsMethod.CHECKBOX, {
                "true": counts.get(True, 0),
                "false": counts.get(False, 0),
                "none": counts.get(None, 0),
            }

        # Retrieve distinct values (may be slow for large datasets)
        distinct_values = ctx.dataset.distinct(field_name)
        distinct_count = len(distinct_values)

        if distinct_count == 0:
            return ShowOptionsMethod.EMPTY, None

        if distinct_count > MAX_CATEGORIES:
            if isinstance(field, fof.StringField):
                return ShowOptionsMethod.AUTOCOMPLETE, distinct_values
            if isinstance(field, fof.IntField):
                return (
                    ShowOptionsMethod.CODE,
                    CustomCodeViewReason.TOO_MANY_INT_CATEGORIES,
                )
            else:
                return (
                    ShowOptionsMethod.CODE,
                    CustomCodeViewReason.TOO_MANY_CATEGORIES,
                )

        # NOTE: may be slow for large datasets
        values = ctx.dataset.count_values(field_name)
        return (
            (ShowOptionsMethod.EMPTY, None)
            if not values
            else (ShowOptionsMethod.CHECKBOX, dict(sorted(values.items())))
        )

        Determines the scenario picker type for a given field based on its type and distinct values.
        - if the field is of type float, shows custom code mode
        - if the field is boolean, shows checkbox mode
        - if the field has no distinct values, shows empty mode
        - if the field has too many distinct values, shows auto-complete or custom code mode
        - if the field has a manageable number of distinct values, shows checkbox mode

        Returns:
            Tuple[str, Any]: Picker type and corresponding values.
        
plugins/operators/model_evaluation/__init__.py