code: def get_last_param_name(url_rule) -> Union[str, None]:
      
      if not url_rule:
          return None
      match = re.search(LAST_PARAM_NAME_RE, url_rule)
      return match.group('param_name') if match else None
docs: Returns the name of the last parameter in a URL rule, eg::
  
          assert get_last_param_name('/foo/<int:id>/roles') is None
  
          url_rule = '/foo/<int:id>/bar/<any:something>/baz/<string:spam>'
          assert get_last_param_name(url_rule) == 'spam'