code: def IntegerLike(msg=None):
      '''
      Checks whether a value is:
          - int, or
          - long, or
          - float without a fractional part, or
          - str or unicode composed only of digits
      '''
      def fn(value):
          if not any([
              isinstance(value, numbers.Integral),
              (isinstance(value, float) and value.is_integer()),
              (isinstance(value, basestring) and value.isdigit())
          ]):
              raise Invalid(msg or (
                  'Invalid input <{0}>; expected an integer'.format(value))
              )
          else:
              return value
      return ff IntegerLike(msg=None):
      '''
      Checks whether a value is:
          - int, or
          - long, or
          - float without a fractional part, or
          - str or unicode composed only of digits
      '''
      def fn(value):
          if not any([
              isinstance(value, numbers.Integral),
              (isinstance(value, float) and value.is_integer()),
              (isinstance(value, basestring) and value.isdigit())
          ]):
              raise Invalid(msg or (
                  'Invalid input <{0}>; expected an integer'.format(value))
              )
          else:
              return value
      return fn
docs: Checks whether a value is:
          - int, or
          - long, or
          - float without a fractional part, or
          - str or unicode composed only of digits