code: def calc_sliced_size(size: int, sliceobj: slice) -> int:
      if np.isnan(size):
          return np.nan
  
      start, stop, step = sliceobj.indices(size)
      return int(ceil(abs((stop - start) / float(step))))
  
imports: import inspect
  import itertools
  import operator
  from collections import OrderedDict
  from collections.abc import Iterable
  from functools import lru_cache, reduce, wraps
  from math import ceil
  from numbers import Integral
  from typing import Dict, List, Union
  import numpy
  from ..core import ExecutableTuple, recursive_tile
  from ..utils import lazy_import
  from ..lib.mmh3 import hash_from_buffer
label_desc: Use image node_id 13 for calling a global function with example usage: calc_sliced_size(size, sliceobj) and returns: int, np