docs: def build_routing_tables(routes, net_keys, omit_default_routes=True):
      """**DEPRECATED** Convert a set of RoutingTrees into a per-chip set of
      routing tables.
  
      .. warning::
          This method has been deprecated in favour of
          :py:meth:`rig.routing_table.routing_tree_to_tables` and
          :py:meth:`rig.routing_table.minimise`.
  
          E.g. most applications should use something like::
  
              from rig.routing_table import routing_tree_to_tables, minimise
              tables = minimise(routing_tree_to_tables(routes, net_keys),
                                target_lengths)
  
          Where target_length gives the number of available routing entries on
          the chips in your SpiNNaker system (see
          :py:func:~rig.routing_table.utils.build_routing_table_target_lengths)
  
      This command produces routing tables with entries optionally omitted when
      the route does not change direction (i.e. when default routing can be
      used).
  
      .. warning::
          A :py:exc:`rig.routing_table.MultisourceRouteError` will
          be raised if entries with identical keys and masks but with differing
          routes are generated. This is not a perfect test, entries which would
          otherwise collide are not spotted.
  
      .. warning::
          The routing trees provided are assumed to be correct and continuous
          (not missing any hops). If this is not the case, the output is
          undefined.
  
      .. note::
          If a routing tree has a terminating vertex whose route is set to None,
          that vertex is ignored.
  
      Parameters
      ----------
      routes : {net: :py:class:`~rig.place_and_route.routing_tree.RoutingTree`, \
                ...}
          The complete set of RoutingTrees representing all routes in the system.
          (Note: this is the same datastructure produced by routers in the
          `place_and_route` module.)
      net_keys : {net: (key, mask), ...}
          The key and mask associated with each net.
      omit_default_routes : bool
          Do not create routing entries for routes which do not change direction
          (i.e. use default routing).
  
      Returns
      -------
      {(x, y): [:py:class:`~rig.routing_table.RoutingTableEntry`, ...]
      """
      from rig.routing_table import routing_tree_to_tables, remove_default_routes
  
      warnings.warn(
          "build_routing_tables() is deprecated, see "
          "rig.routing_table.routing_tree_to_tables()"
          "and rig.routing_table.minimise()", DeprecationWarning
      )
  
      # Build full routing tables and then remove default entries from them
      tables = dict()
  
      for chip, table in iteritems(routing_tree_to_tables(routes, net_keys)):
          if omit_default_routes:
              table = remove_default_routes.minimise(table, target_length=None)
  
          # If the table is empty don't add it to the dictionary of tables.
          if table:
              tables[chip] = table
  
      return tables