parameters: (func_name, kwargs)
return_statement: return kwargs["warn"]
docstring: Backwards-compatibility with Python 2.7 to allow treating 'warn' as keyword-only.
docstring_summary: Backwards-compatibility with Python 2.7 to allow treating 'warn' as keyword-only.
docstring_tokens: Backwards - compatibility with Python 2 . 7 to allow treating warn as keyword - only .
function: def _warn_keyword_parameter(func_name, kwargs):
      # type: (str, Dict[str, bool]) -> bool
      """
      Backwards-compatibility with Python 2.7 to allow treating 'warn' as keyword-only.
      """
      if not kwargs:
          return False
      elif len(kwargs) > 1 or "warn" not in kwargs:
          kwargs.pop("warn", None)
          arg = next(iter(kwargs.keys()))
          raise TypeError(
              "{}() got an unexpected keyword argument {!r}".format(func_name, arg)
          )
      return kwargs["warn"]
function_tokens: def _warn_keyword_parameter ( func_name , kwargs ) : # type: (str, Dict[str, bool]) -> bool if not kwargs : return False elif len ( kwargs ) > 1 or "warn" not in kwargs : kwargs . pop ( "warn" , None ) arg = next ( iter ( kwargs . keys ( ) ) ) raise TypeError ( "{}() got an unexpected keyword argument {!r}" . format ( func_name , arg ) ) return kwargs [ "warn" ]