# Path: mom/builtins.py
# def byte(number):
# def bytes_leading(raw_bytes, needle=_compat.ZERO_BYTE):
# def bytes_trailing(raw_bytes, needle=_compat.ZERO_BYTE):
# def bin(number, prefix="0b"):
# def hex(number, prefix="0x"):
# def is_sequence(obj):
# def is_unicode(obj):
# def is_bytes(obj):
# def is_bytes_or_unicode(obj):
# def is_integer(obj):
# def integer_byte_length(number):
# def integer_byte_size(number):
# def integer_bit_length(number):
# def integer_bit_size(number):
# def integer_bit_count(number):
# def is_even(num):
# def is_odd(num):
# def is_positive(num):
# def is_negative(num):


import itertools
from mom import builtins
  from itertools import izip
  from itertools import starmap
  .. versionchanged:: 0.5
     Items don't have to be hashable any more.
  """
  seen = set() if seen is None else set(seen)
  seen_unhashable = []
  for item in iterable:
    try:
      if item not in seen:
        seen.add(item)
        yield item
    except TypeError:
      if item not in seen_unhashable:
        seen_unhashable.append(item)
        yield item


def flatten(iterable, ignore=None):
  """Flattens a nested `iterable`.

  :param ignore:
      Types of iterable objects which should be yielded as-is.

  .. versionadded:: 0.5
  """
  stack = [iter(iterable)]
  while stack:
    try:
      item = stack[-1].next()
      if ignore and isinstance(item, ignore):
        yield item

# Path: mom/builtins.py
# def byte(number):
# def bytes_leading(raw_bytes, needle=_compat.ZERO_BYTE):
# def bytes_trailing(raw_bytes, needle=_compat.ZERO_BYTE):
# def bin(number, prefix="0b"):
# def hex(number, prefix="0x"):
# def is_sequence(obj):
# def is_unicode(obj):
# def is_bytes(obj):
# def is_bytes_or_unicode(obj):
# def is_integer(obj):
# def integer_byte_length(number):
# def integer_byte_size(number):
# def integer_bit_length(number):
# def integer_bit_size(number):
# def integer_bit_count(number):
# def is_even(num):
# def is_odd(num):
# def is_positive(num):
# def is_negative(num):


# Path: mom/itertools.py
import itertools
from mom import builtins
  from itertools import izip
  from itertools import starmap

  .. versionchanged:: 0.5
     Items don't have to be hashable any more.
  """
  seen = set() if seen is None else set(seen)
  seen_unhashable = []
  for item in iterable:
    try:
      if item not in seen:
        seen.add(item)
        yield item
    except TypeError:
      if item not in seen_unhashable:
        seen_unhashable.append(item)
        yield item


def flatten(iterable, ignore=None):
  """Flattens a nested `iterable`.

  :param ignore:
      Types of iterable objects which should be yielded as-is.

  .. versionadded:: 0.5
  """
  stack = [iter(iterable)]
  while stack:
    try:
      item = stack[-1].next()
      if ignore and isinstance(item, ignore):
        yield item

      elif builtins.is_bytes_or_unicode(item) and len(item) == 1: