Recompute the value as the bytes at the node.
171323
def visit_Bytes(self, node: ast.Bytes) -> bytes:
        """"""
        result = node.s

        self.recomputed_values[node] = result
        return node.s
221228
def _value_data(self, value):
        """"""
        return codecs.decode(
            codecs.encode(self.value_value(value)[1], 'base64'), 'utf8')
776333
def from_payload(self, payload):
        """"""
        self.node_id = payload[0]
        self.name = bytes_to_string(payload[1:65])
        self.order = payload[65] * 256 + payload[66]
        self.placement = payload[67]
        self.node_variation = NodeVariation(payload[68])
286647
def insert(self, value):
        """"""
        if not self.payload or value == self.payload:
            self.payload = value
        else:
            if value <= self.payload:
                if self.left:
                    self.left.insert(value)
                else:
                    self.left = BinaryTreeNode(value)
            else:
                if self.right:
                    self.right.insert(value)
                else:
                    self.right = BinaryTreeNode(value)
214955
def _map_value(self, value):
        '''  '''
        # TODO: Once we've gotten here, we've done the following:
        # -> Recieve the full response, copy it from network buffer it into a ByteBuffer (copy 1)
        # -> Copy all the data into a String (copy 2)
        # -> Deserialize that string (copy 3)
        # -> Map the deserialized JSON to our response format (copy 4, what we are doing in this method)
        # This should not bee needed. Technically, this mapping from transport format to python types should require exactly one copy, 
        # from the network buffer into the python VM.
        if isinstance(value, list):
            out = []
            for c in value:
                out.append(self._map_value( c ))
            return out
        elif isinstance(value, dict) and 'metadata' in value and 'labels' in value['metadata'] and 'self' in value:
            return neo4j.Node(ustr(value['metadata']['id']), value['metadata']['labels'], value['data'])
        elif isinstance(value, dict) and 'metadata' in value and 'type' in value and 'self' in value:
            return neo4j.Relationship(ustr(value['metadata']['id']), value['type'], value['start'].split('/')[-1], value['end'].split('/')[-1], value['data'])
        elif isinstance(value, dict):
            out = {}
            for k,v in value.items():
                out[k] = self._map_value( v )
            return out
        elif isinstance(value, str):
            return ustr(value)
        else:
            return value
367275
def inc_convert(self, value):
        """"""
        if not os.path.isabs(value):
            value = os.path.join(self.base, value)
        with codecs.open(value, 'r', encoding='utf-8') as f:
            result = json.load(f)
        return result
1083858
def update(self, value: Union[RawValue, Value],
               raw: bool = False) -> "InstanceNode":
        
        newval = self.schema_node.from_raw(
            value, self.json_pointer()) if raw else value
        return self._copy(newval)
330454
def _bytes_to_json(value):
    """"""
    if isinstance(value, bytes):
        value = base64.standard_b64encode(value).decode("ascii")
    return value
111460
def write_byte(self, value):
        """"""
        format = '!B'
        self.data.append(struct.pack(format, value))
        self.size += 1
745728
def from_payload(self, payload):
        """"""
        self.node_id = payload[0]
        self.name = bytes_to_string(payload[1:65])
89292
def as_bin(self, as_spendable=False):
        """"""
        f = io.BytesIO()
        self.stream(f, as_spendable=as_spendable)
        return f.getvalue()
516645
def _to_binary(val):
    """"""
    if isinstance(val, text_type):
        return val.encode('utf-8')
    assert isinstance(val, binary_type)
    return val
1086989
def raw_data(self, value):
        """"""
        if value:
            try:
                value = value.read()
            except AttributeError:
                pass
            b64 = base64.b64encode(value.encode('utf-8'))
            self.data = b64.decode('utf-8')
27443
def visit_Num(self, node: ast.Num) -> Union[int, float]:
        """"""
        result = node.n

        self.recomputed_values[node] = result
        return result
774914
def from_bytes(self, raw):
        ''''''
        if len(raw) < Ethernet._MINLEN:
            raise NotEnoughDataError("Not enough bytes ({}) to reconstruct an "
                "Ethernet object".format(len(raw)))
        dst,src,ethertype = struct.unpack(Ethernet._PACKFMT, 
            raw[:Ethernet._MINLEN])
        self.src = src
        self.dst = dst
        if ethertype <= 1500:
            self.ethertype = EtherType.NoType
        else:
            self.ethertype = ethertype
        return raw[Ethernet._MINLEN:]
244092
def replace_bytes(self, m):
        """"""

        esc = m.group(0)
        value = esc
        if m.group('special'):
            value = BACK_SLASH_TRANSLATION[esc]
        elif m.group('char'):
            try:
                value = chr(int(esc[2:], 16))
            except Exception:
                value = esc
        elif m.group('oct'):
            value = int(esc[1:], 8)
            if value > 255:
                value -= 256
            value = chr(value)
        return value.replace('\x00', '\n')
954511
def visit_DictComp(self, node: ast.DictComp) -> None:
        """"""
        if node in self._recomputed_values:
            value = self._recomputed_values[node]
            text = self._atok.get_text(node)

            self.reprs[text] = value

        self.generic_visit(node=node)