code: def hardsigmoid(input: Tensor, inplace: bool = False) -> Tensor:
      r"""This is the quantized version of :func:`~torch.nn.functional.hardsigmoid`."""
      if not input.is_quantized:
          raise ValueError(
              "Input to 'quantized.hardsigmoid' must be quantized!"
          )
      if inplace:
          return torch._C._nn.hardsigmoid_(input)  # type: ignore[attr-defined]
      return torch._C._nn.hardsigmoid(input)
  
imports: from typing import List, Optional
  import warnings
  import torch
  from torch import Tensor
  from torch.nn.modules.utils import _pair, _triple
  from torch.jit.annotations import BroadcastingList2
  from .modules.utils import _pair_from_first
label_desc: Use image node_id 18 for calling a global function with example usage: hardsigmoid(input, inplace) and returns: torch, torch