def is_sequence(obj):
    """
    Returns:
      True if the sequence is a collections.Sequence and not a string.
    """
    return (isinstance(obj, collections.Sequence)
            and not isinstance(obj, str))

    Returns:
      True if the sequence is a collections.Sequence and not a string.
    
surreal/utils/common.py