code: def url_escape(value: Union[str, bytes], plus: bool = True) -> str:
      """Returns a URL-encoded version of the given value.
  
      Equivalent to either `urllib.parse.quote_plus` or `urllib.parse.quote` depending on the ``plus``
      argument.
  
      If ``plus`` is true (the default), spaces will be represented as ``+`` and slashes will be
      represented as ``%2F``.  This is appropriate for query strings. If ``plus`` is false, spaces
      will be represented as ``%20`` and slashes are left as-is. This is appropriate for the path
      component of a URL. Note that the default of ``plus=True`` is effectively the
      reverse of Python's urllib module.
  
      .. versionadded:: 3.1
          The ``plus`` argument
      """
      quote = urllib.parse.quote_plus if plus else urllib.parse.quote
      return quote(value)
  
imports: import html
  import json
  import re
  import urllib.parse
  from tornado.util import unicode_type
  import typing
  from typing import Union, Any, Optional, Dict, List, Callable
label_desc: Use image node_id 6 for calling a global function with example usage: url_escape(value, plus) and returns: quote