code: def _close_fstring_if_necessary(
      fstring_stack, string, line_nr, column, additional_prefix
  ):
      for fstring_stack_index, node in enumerate(fstring_stack):
          lstripped_string = string.lstrip()
          len_lstrip = len(string) - len(lstripped_string)
          if lstripped_string.startswith(node.quote):
              token = PythonToken(
                  FSTRING_END,
                  node.quote,
                  (line_nr, column + len_lstrip),
                  prefix=additional_prefix + string[:len_lstrip],
              )
              additional_prefix = ""
              assert not node.previous_lines
              del fstring_stack[fstring_stack_index:]
              return token, "", len(node.quote) + len_lstrip
      return None, additional_prefix, 0
  
imports: from __future__ import absolute_import
  import sys
  import re
  from collections import namedtuple
  import itertools
  from codecs import BOM_UTF8
  from parso.python.token import PythonTokenTypes
  from parso.utils import split_lines
label_desc: Use image node_id 7 for calling a global function with example usage: _close_fstring_if_necessary(fstring_stack, string, line_nr, column, additional_prefix) and returns: None,  additional_prefix,  int, token,  str,  unknown