code: def get_backend_stats_url(config, hub, backend_type):
      
      if ((config is not None) and ('hub' in config) and (hub is None)):
          hub = config["hub"]
      if (hub is not None):
          return '/Network/{}/devices/{}'.format(hub, backend_type)
      return '/Backends/{}'.format(backend_type)
docs: Util method to get backend stats url