Return a pretty formatted representation of self.
        Include additional debug details if `debug` is True.
508077
def pretty(self, indent=1, debug=False):
        
        debug_details = ''
        if debug:
            debug_details += '<isliteral=%r, iscanonical=%r>' % (self.isliteral, self.iscanonical)
        if self.isliteral:
            pretty_literal = self.args[0].pretty(indent=0, debug=debug)
            return (' ' * indent) + '%s(%s%s)' % (self.__class__.__name__, debug_details, pretty_literal)
        else:
            return super(NOT, self).pretty(indent=indent, debug=debug)
49363
def pretty_identifier(self):
        

        ident = self.get_name()
        if self.is_method:
            args = ",".join(self.pretty_arg_types())
            ident = "%s(%s)" % (ident, args)

        return "%s:%s" % (ident, self.pretty_type())
222836
def debug(self):
        ''''''
        url = '{}/debug/status'.format(self.url)
        data = self._get(url)
        return data.json()
158421
def output_for_debugging(self, stream, data):
        """"""
        with open('%s.spec.out' % stream.name, 'w') as f: f.write(str(data))
492033
def pretty_str(self, indent=0):
        
        return '\n\n'.join(
                codeobj.pretty_str(indent=indent)
                for codeobj in self.children
        )
1311317
def debug_object(obj: T) -> str:
    """"""
    pairs = []
    for k, v in vars(obj).items():
        pairs.append(u"{}={}".format(k, v))
    return u", ".join(pairs)
1185661
def format(self, record):
        
        if record.levelno == DEBUG:
            return self.debug_formatter.format(record)
        if record.levelno == INFO:
            return self.info_formatter.format(record)
        if record.levelno == ERROR:
            return self.error_formatter.format(record)
        if record.levelno == WARNING:
            return self.warning_formatter.format(record)
        if record.levelno == CRITICAL:
            return self.critical_formatter.format(record)
577161
def pretty_print(self, show_datetime=True):
        
        if show_datetime:
            return u"[%s] %s %s%s: %s" % (
                self.severity,
                gf.object_to_unicode(self.time),
                u" " * self.indentation,
                self.tag,
                self.message
            )
        return u"[%s] %s%s: %s" % (
            self.severity,
            u" " * self.indentation,
            self.tag,
            self.message
        )
463359
def debug_msg(message):
        
        message = message or ""
        if Console.color:
            Console.cprint('RED', 'DEBUG: ', message)
        else:
            print(Console.msg('DEBUG: ' + message))
644664
def pretty(self, obj=None, display=True):
        
        ret = self._format_obj(obj if obj is not None else self.obj)
        if display:
            print(ret)
        else:
            return ret
880694
def format(self):
        
        _bold = bold
        if not self.pretty:
            _bold = lambda x: x
        # Attach memory address and return
        _attrs = self._format_attrs()
        self.data = "<{}.{}({}){}>{}".format(
            self.obj.__module__ if hasattr(self.obj, "__module__") \
                else "__main__",
            _bold(self.obj.__class__.__name__),
            _attrs,
            ":{}".format(hex(id(self.obj))) if self.address else "",
            _break+self.supplemental if self.supplemental else "")
        return stdout_encode(self.data)
1097274
def debugger():
    """"""
    sdb = _current[0]
    if sdb is None or not sdb.active:
        sdb = _current[0] = Sdb()
    return sdb
1298739
def debug(self, i: int=None) -> str:
        
        head = "[" + colors.yellow("debug") + "]"
        if i is not None:
            head = str(i) + " " + head
        return head
335824
def debug(self, *msg):
        
        label = colors.yellow("DEBUG")
        self._msg(label, *msg)
1317012
def pretty(self):
        '''
        
        '''
        return '{}:{} in {}.{}'.format(
            self.filename,
            self.line_number,
            self.module_name,
            self.function_name)
434484
def debug_string(self):
        """"""

        if self._resources_initialized:
            status = "Resources requested: {}/{} CPUs, {}/{} GPUs".format(
                self._committed_resources.cpu, self._avail_resources.cpu,
                self._committed_resources.gpu, self._avail_resources.gpu)
            customs = ", ".join([
                "{}/{} {}".format(
                    self._committed_resources.get_res_total(name),
                    self._avail_resources.get_res_total(name), name)
                for name in self._avail_resources.custom_resources
            ])
            if customs:
                status += " ({})".format(customs)
            return status
        else:
            return "Resources requested: ?"
1098062
def with_debug_id(debug_id):
        """"""
        ctx = SpanContext(
            trace_id=None, span_id=None, parent_id=None, flags=None
        )
        ctx._debug_id = debug_id
        return ctx