code: def GetPathFromLink(resource_link, resource_type=''):
      
      resource_link = TrimBeginningAndEndingSlashes(resource_link)
          
      if IsNameBased(resource_link):
          # Replace special characters in string using the %xx escape. For example, space(' ') would be replaced by %20
          # This function is intended for quoting the path section of the URL and excludes '/' to be quoted as that's the default safe char
          resource_link = urllib_quote(resource_link)
          
      # Padding leading and trailing slashes to the path returned both for name based and resource id based links
      if resource_type:
          return '/' + resource_link + '/' + resource_type + '/'
      else:
          return '/' + resource_link + '/'
docs: Gets path from resource link with optional resource type
  
      :param str resource_link:
      :param str resource_type:
  
      :return:
          Path from resource link with resource type appended (if provided).
      :rtype: str