parameters: (tok: tuple[int, str])
return_statement: return toknum, tokval
docstring: Replace local variables with a syntactically valid name.
  
      Parameters
      ----------
      tok : tuple of int, str
          ints correspond to the all caps constants in the tokenize module
  
      Returns
      -------
      tuple of int, str
          Either the input or token or the replacement values
  
      Notes
      -----
      This is somewhat of a hack in that we rewrite a string such as ``'@a'`` as
      ``'__pd_eval_local_a'`` by telling the tokenizer that ``__pd_eval_local_``
      is a ``tokenize.OP`` and to replace the ``'@'`` symbol with it.
docstring_summary: Replace local variables with a syntactically valid name.
docstring_tokens: Replace local variables with a syntactically valid name .
function: def _replace_locals(tok: tuple[int, str]) -> tuple[int, str]:
      """
      Replace local variables with a syntactically valid name.
  
      Parameters
      ----------
      tok : tuple of int, str
          ints correspond to the all caps constants in the tokenize module
  
      Returns
      -------
      tuple of int, str
          Either the input or token or the replacement values
  
      Notes
      -----
      This is somewhat of a hack in that we rewrite a string such as ``'@a'`` as
      ``'__pd_eval_local_a'`` by telling the tokenizer that ``__pd_eval_local_``
      is a ``tokenize.OP`` and to replace the ``'@'`` symbol with it.
      """
      toknum, tokval = tok
      if toknum == tokenize.OP and tokval == "@":
          return tokenize.OP, LOCAL_TAG
      return toknum, tokval
function_tokens: def _replace_locals ( tok : tuple [ int , str ] ) -> tuple [ int , str ] : toknum , tokval = tok if toknum == tokenize . OP and tokval == "@" : return tokenize . OP , LOCAL_TAG return toknum , tokval