# Path: snoop/utils.py
# PY34 = sys.version_info[:2] == (3, 4)
# NO_ASTTOKENS = PY34
# PYPY = 'pypy' in sys.version.lower()
# NO_BIRDSEYE = NO_ASTTOKENS or PYPY
# REPR_TARGET_LENGTH = 100
# def shitcode(s):
# def truncate(seq, max_length, middle):
# def truncate_string(string, max_length):
# def truncate_list(lst, max_length):
# def ensure_tuple(x, split=False):
# def short_filename(code):
# def is_comprehension_frame(frame):
# def needs_parentheses(source):
#     def code(s):
# def with_needed_parentheses(source):
# def my_cheap_repr(x):
#     def __init__(self, factory):
#     def __missing__(self, key):
# def optional_numeric_label(i, lst):
# def is_pathlike(x):
#     def iscoroutinefunction(_):
# def no_args_decorator(args, kwargs):
#     def __repr__(self):
# def _register_cheap_reprs():
#     def _sample_indices(length, max_length):
#     def _repr_series_one_line(x, helper):
# class ArgDefaultDict(dict):
#     class FormattedValue(object):
# class DirectRepr(str):
#     class QuerySet(object):


import ast
import opcode
import threading
import traceback
import executing
import six
from collections import defaultdict
from datetime import datetime
from textwrap import dedent
from pygments import highlight
from pygments.formatters.terminal256 import Terminal256Formatter
from pygments.lexers.python import Python3Lexer
from pygments.styles.monokai import MonokaiStyle
from six import PY3
from snoop.utils import ensure_tuple, short_filename, my_cheap_repr, \
    NO_ASTTOKENS, optional_numeric_label, try_statement, FormattedValue, ArgDefaultDict, lru_cache
    from pygments.lexers.python import Python2Lexer
    from pygments.lexers.python import PythonLexer as Python2Lexer
class Source(executing.Source):
    def __init__(self, *args, **kwargs):
        super(Source, self).__init__(*args, **kwargs)
        if self.tree and self.text:
            self.highlighted = ArgDefaultDict(
                lambda style: raw_highlight(self.text, style).splitlines()
            )
        else:
            self.lines = defaultdict(lambda: u'SOURCE IS UNAVAILABLE')
            self.highlighted = defaultdict(lambda: self.lines)
        self.statements = StatementsDict(self)
        self.nodes = []
        if self.tree:
            self.tree._depth = 0
            for node in ast.walk(self.tree):
                node._tree_index = len(self.nodes)
                self.nodes.append(node)
                for child in ast.iter_child_nodes(node):
                    child._depth = node._depth + 1

    def get_text_with_indentation(self, node):
        result = self.asttokens().get_text(node)
        
        if not result:
            if isinstance(node, FormattedValue):
                fvals = [
                    n for n in node.parent.values
                    if isinstance(n, FormattedValue)
                ]
                return u'<f-string value{}>'.format(

# Path: snoop/utils.py
# PY34 = sys.version_info[:2] == (3, 4)
# NO_ASTTOKENS = PY34
# PYPY = 'pypy' in sys.version.lower()
# NO_BIRDSEYE = NO_ASTTOKENS or PYPY
# REPR_TARGET_LENGTH = 100
# def shitcode(s):
# def truncate(seq, max_length, middle):
# def truncate_string(string, max_length):
# def truncate_list(lst, max_length):
# def ensure_tuple(x, split=False):
# def short_filename(code):
# def is_comprehension_frame(frame):
# def needs_parentheses(source):
#     def code(s):
# def with_needed_parentheses(source):
# def my_cheap_repr(x):
#     def __init__(self, factory):
#     def __missing__(self, key):
# def optional_numeric_label(i, lst):
# def is_pathlike(x):
#     def iscoroutinefunction(_):
# def no_args_decorator(args, kwargs):
#     def __repr__(self):
# def _register_cheap_reprs():
#     def _sample_indices(length, max_length):
#     def _repr_series_one_line(x, helper):
# class ArgDefaultDict(dict):
#     class FormattedValue(object):
# class DirectRepr(str):
#     class QuerySet(object):


# Path: snoop/formatting.py
import ast
import opcode
import threading
import traceback
import executing
import six
from collections import defaultdict
from datetime import datetime
from textwrap import dedent
from pygments import highlight
from pygments.formatters.terminal256 import Terminal256Formatter
from pygments.lexers.python import Python3Lexer
from pygments.styles.monokai import MonokaiStyle
from six import PY3
from snoop.utils import ensure_tuple, short_filename, my_cheap_repr, \
    NO_ASTTOKENS, optional_numeric_label, try_statement, FormattedValue, ArgDefaultDict, lru_cache
    from pygments.lexers.python import Python2Lexer
    from pygments.lexers.python import PythonLexer as Python2Lexer

class Source(executing.Source):
    def __init__(self, *args, **kwargs):
        super(Source, self).__init__(*args, **kwargs)
        if self.tree and self.text:
            self.highlighted = ArgDefaultDict(
                lambda style: raw_highlight(self.text, style).splitlines()
            )
        else:
            self.lines = defaultdict(lambda: u'SOURCE IS UNAVAILABLE')
            self.highlighted = defaultdict(lambda: self.lines)
        self.statements = StatementsDict(self)
        self.nodes = []
        if self.tree:
            self.tree._depth = 0
            for node in ast.walk(self.tree):
                node._tree_index = len(self.nodes)
                self.nodes.append(node)
                for child in ast.iter_child_nodes(node):
                    child._depth = node._depth + 1

    def get_text_with_indentation(self, node):
        result = self.asttokens().get_text(node)
        
        if not result:
            if isinstance(node, FormattedValue):
                fvals = [
                    n for n in node.parent.values
                    if isinstance(n, FormattedValue)
                ]
                return u'<f-string value{}>'.format(

                    optional_numeric_label(