docs: def is_sequence(i, include=None):
      """
      Return a boolean indicating whether ``i`` is a sequence in the SymPy
      sense. If anything that fails the test below should be included as
      being a sequence for your application, set 'include' to that object's
      type; multiple types should be passed as a tuple of types.
  
      Note: although generators can generate a sequence, they often need special
      handling to make sure their elements are captured before the generator is
      exhausted, so these are not included by default in the definition of a
      sequence.
  
      See also: iterable
  
      Examples
      ========
  
      >>> from sympy.utilities.iterables import is_sequence
      >>> from types import GeneratorType
      >>> is_sequence([])
      True
      >>> is_sequence(set())
      False
      >>> is_sequence('abc')
      False
      >>> is_sequence('abc', include=str)
      True
      >>> generator = (c for c in 'abc')
      >>> is_sequence(generator)
      False
      >>> is_sequence(generator, include=(str, GeneratorType))
      True
  
      """
      return (hasattr(i, '__getitem__') and
              iterable(i) or
              bool(include) and
              isinstance(i, include))