code: def hard_sigmoid(x, inplace: bool = False):
      if inplace:
          return x.add_(3.0).clamp_(0.0, 6.0).div_(6.0)
      else:
          return F.relu6(x + 3.0) / 6.0
  
imports: import torch
  from torch import nn
  from torch.nn import functional
label_desc: Use image node_id 6 for calling a global function with example usage: hard_sigmoid(x, inplace) and returns: x, unknown