def _cal_cutoff_position(length, thickness, keyIdx):
  """Returns cutoff indices of keyIdx-centred truncated list

  Args:
    length: `int`, length of a list
    thickness: `int`, cutoff thickness - number of slices
    keyIdx: `int`, index of the key slice

  Returns:
    a tuple of two `int`
  """
  left_block = (thickness - 1) // 2
  right_block = thickness - 1 - left_block

  start = max(0, keyIdx - left_block)
  end = min(length - 1, keyIdx + right_block)
  return start, end