code: def __call__(self, sequence):
      if isinstance(self._value, string_types):
          if self._value.endswith("%"):
              total_count = len(sequence)
              percentage = int(self._value[:-1])
              # at least one sentence should be chosen
              count = max(1, total_count * percentage // 100)
              return sequence[:count]
          else:
              return sequence[: int(self._value)]
      elif isinstance(self._value, (int, float)):
          return sequence[: int(self._value)]
      else:
          ValueError(
              "Unsuported value of items count '%s'." % self._value
          )
  
imports: from __future__ import absolute_import
  from __future__ import division, print_function, unicode_literals
  import sys
  import requests
  import pkgutil
  from functools import wraps
  from contextlib import closing
  from os.path import dirname, abspath, join
  from ._compat import to_string, to_unicode, string_types
  from pycountry import languages
label_desc: Use image node_id 2 for calling the ItemsCount obj's underlying member method code with example usage: obj.__call__(sequence) and returns: sequence, sequence, sequence