whole_func_string: function generateStatsdRoutes(stats) {
    var result = {};
    Object.keys(stats).forEach(function(name) {
      var routes = stats[name];
      if (!(routes instanceof Array)) {
        routes = [routes];
      }
      routes.forEach(function(route) {
        result[route.path] = {
          name: name,
          methods: route.method ? route.method : route.methods
        };
      });
  
  
    });
    return result;
  }
func_code_string: function generateStatsdRoutes(stats) {
    var result = {};
    Object.keys(stats).forEach(function(name) {
      var routes = stats[name];
      if (!(routes instanceof Array)) {
        routes = [routes];
      }
      routes.forEach(function(route) {
        result[route.path] = {
          name: name,
          methods: route.method ? route.method : route.methods
        };
      });
  
  
    });
    return result;
  }
func_documentation_string: Converts input stats estructure to the internal structure. In converts from:
  name: [{path: '', methods: []}]
  
  To:
  path: { methods: [], name: ''}
  
  It also supports the following format:
  
  name: {path: '', method: ''}