def _value_format_selection(self, definition: str, **kwargs: Any) -> Union[int, str]:
        """
        Formats the string in different ways depending on its contents.

        The return can be the '@word' itself, a '{{ token }}' passed to PyStr,
        or a 'provider:argument_group' format field that returns potentially
        a non-string type.

        This ensures that Numbers, Boolean types that are generated in the
        JSON structures in there proper type, and not just strings.
        """

        # Check for PyStr first as complex strings may start with @
        if re.match(r".*\{\{.*\}\}.*", definition):
            return self.generator.pystr_format(definition)

        # Check for fixed @words that won't be generated
        if re.match(r"^@.*", definition):
            return definition.lstrip("@")

        # Check if an argument group has been supplied
        if re.match(r"^[a-zA-Z0-9_-]*:\w", definition):
            definition, argument_group = definition.split(":")
            arguments = self.generator.get_arguments(argument_group.strip())

            return self.generator.format(definition.strip(), **arguments)

        # Assume the string is referring to a provider
        return self.generator.format(definition, **kwargs)

        Formats the string in different ways depending on its contents.

        The return can be the '@word' itself, a '{{ token }}' passed to PyStr,
        or a 'provider:argument_group' format field that returns potentially
        a non-string type.

        This ensures that Numbers, Boolean types that are generated in the
        JSON structures in there proper type, and not just strings.
        
faker/providers/misc/__init__.py