parameters: (
      lhs: List[Union[network_types.UnicastRoute, network_types.MplsRoute]],
      rhs: List[Union[network_types.UnicastRoute, network_types.MplsRoute]],
      route_type: str = "unicast",
  )
return_statement: return diff
docstring: Get routeDb delta between provided inputs
docstring_summary: Get routeDb delta between provided inputs
docstring_tokens: Get routeDb delta between provided inputs
function: def routes_difference(
      lhs: List[Union[network_types.UnicastRoute, network_types.MplsRoute]],
      rhs: List[Union[network_types.UnicastRoute, network_types.MplsRoute]],
      route_type: str = "unicast",
  ) -> List[Union[network_types.UnicastRoute, network_types.MplsRoute]]:
      """
      Get routeDb delta between provided inputs
      """
  
      diff = []
  
      # dict of prefixes(str) : nexthops(str)
      _lhs = get_route_as_dict(lhs, route_type)
      _rhs = get_route_as_dict(rhs, route_type)
  
      # diff_keys will be:
      #   1. dest for network_types.UnicastRoute
      #   2. topLabel for network_types.MplsRoute
      diff_keys = set(_lhs) - set(_rhs)
      for key in diff_keys:
          diff.append(_lhs[key])
  
      return diff
function_tokens: def routes_difference ( lhs : List [ Union [ network_types . UnicastRoute , network_types . MplsRoute ] ] , rhs : List [ Union [ network_types . UnicastRoute , network_types . MplsRoute ] ] , route_type : str = "unicast" , ) -> List [ Union [ network_types . UnicastRoute , network_types . MplsRoute ] ] : diff = [ ] # dict of prefixes(str) : nexthops(str) _lhs = get_route_as_dict ( lhs , route_type ) _rhs = get_route_as_dict ( rhs , route_type ) # diff_keys will be: #   1. dest for network_types.UnicastRoute #   2. topLabel for network_types.MplsRoute diff_keys = set ( _lhs ) - set ( _rhs ) for key in diff_keys : diff . append ( _lhs [ key ] ) return diff