original_string: protected function cleanPath($uri)
      {
          $urlPath = parse_url($uri, PHP_URL_PATH);
          $uri     = str_replace('v1/', '', $urlPath);
          $path    = preg_replace('/(\/\w{10}$|self|\d*)/', '', $uri);
          return trim(preg_replace('/\/{1,2}|\-/', '_', $path), '_');
      }
code: protected function cleanPath($uri)
      {
          $urlPath = parse_url($uri, PHP_URL_PATH);
          $uri     = str_replace('v1/', '', $urlPath);
          $path    = preg_replace('/(\/\w{10}$|self|\d*)/', '', $uri);
          return trim(preg_replace('/\/{1,2}|\-/', '_', $path), '_');
      }
code_tokens: protected function cleanPath ( $ uri ) { $ urlPath = parse_url ( $ uri , PHP_URL_PATH ) ; $ uri = str_replace ( 'v1/' , '' , $ urlPath ) ; $ path = preg_replace ( '/(\/\w{10}$|self|\d*)/' , '' , $ uri ) ; return trim ( preg_replace ( '/\/{1,2}|\-/' , '_' , $ path ) , '_' ) ; }
docstring: Removes any unwanted suffixes and values from a URL path.
  
  @param $uri
  
  @return string
docstring_tokens: Removes any unwanted suffixes and values from a URL path .