def _create_placeholder(self, _input: InputType) -> Placeholder:
        """
        Converts an InputType into a Placeholder.

        1. ``StateType`` into ``mb.state_tensor_placeholder``.
        2. ``TensorType`` and ``ImageType`` into ``mb.placeholder``.
        """
        shape = _input.shape.symbolic_shape
        dtype = _input.dtype
        # int64 and fp64 are not supported, so they are mapped to int32 / fp32 accordingly
        if dtype == types.int64:
            dtype = types.int32
            logger.warning(f"int64 dtype input {_input.name} down casted to int32.")
        elif dtype == types.fp64:
            dtype = types.fp32
            logger.warning(f"fp64 dtype input {_input.name} down casted to fp32.")
        elif isinstance(_input, ImageType) and  _input.grayscale_use_uint8:
            # Only supported on iOS17+
            if self.opset_version is None or self.opset_version < _target.iOS17:
                raise ValueError("'grayscale_use_uint8' on image input can only be set when" \
                                 " minimum_deployment_target is iOS17 or higher")
            dtype = types.uint8

        if isinstance(_input, StateType):
            return mb.state_tensor_placeholder(shape, dtype=dtype)

        return mb.placeholder(shape, dtype=dtype)

        Converts an InputType into a Placeholder.

        1. ``StateType`` into ``mb.state_tensor_placeholder``.
        2. ``TensorType`` and ``ImageType`` into ``mb.placeholder``.
        
coremltools/converters/mil/frontend/torch/converter.py