code: def floor_divide(a: NdarrayOrTensor, b) -> NdarrayOrTensor:
      """`np.floor_divide` with equivalent implementation for torch.
  
      As of pt1.8, use `torch.div(..., rounding_mode="floor")`, and
      before that, use `torch.floor_divide`.
  
      Args:
          a: first array/tensor
          b: scalar to divide by
  
      Returns:
          Element-wise floor division between two arrays/tensors.
      """
      if isinstance(a, torch.Tensor):
          if is_module_ver_at_least(torch, (1, 8, 0)):
              return torch.div(a, b, rounding_mode="floor")
          return torch.floor_divide(a, b)
      return np.floor_divide(a, b)
  
imports: from __future__ import annotations
  from collections.abc import Sequence
  from typing import TypeVar
  import numpy
  import torch
  from monai.config.type_definitions import NdarrayOrTensor, NdarrayTensor
  from monai.utils.misc import is_module_ver_at_least
  from monai.utils.type_conversion import convert_data_type, convert_to_dst_type
label_desc: Use image node_id 10 for calling a global function with example usage: floor_divide(a, b) and returns: np, torch, torch