original_docstring: Export the data as an exportable dict
docstring: Export the data as an exportable dict
docstring_tokens: Export the data as an exportable dict
code: def to_dict(self):
          """Export the data as an exportable dict"""
          sorted_ipv4_nets = sorted(
              self.ipv4_networks.items(),
              key=lambda x: (x[1].network_address.packed, x[1].prefixlen))
          sorted_ipv6_nets = sorted(
              self.ipv6_networks.items(),
              key=lambda x: (x[1].network_address.packed, x[1].prefixlen))
          result = collections.OrderedDict()
          for net_cidr, _ in itertools.chain(sorted_ipv4_nets, sorted_ipv6_nets):
              result[net_cidr] = self.network_names.get(net_cidr, '')
          return result
code_tokens: def to_dict ( self ) : sorted_ipv4_nets = sorted ( self . ipv4_networks . items ( ) , key = lambda x : ( x [ 1 ] . network_address . packed , x [ 1 ] . prefixlen ) ) sorted_ipv6_nets = sorted ( self . ipv6_networks . items ( ) , key = lambda x : ( x [ 1 ] . network_address . packed , x [ 1 ] . prefixlen ) ) result = collections . OrderedDict ( ) for net_cidr , _ in itertools . chain ( sorted_ipv4_nets , sorted_ipv6_nets ) : result [ net_cidr ] = self . network_names . get ( net_cidr , '' ) return result
short_docstring: Export the data as an exportable dict
short_docstring_tokens: Export the data as an exportable dict
comment: """Export the data as an exportable dict"""