code: def global_state_code(self):
          
          self._generate_func_code()
  
          if not self._compile_regexps:
              return '\n'.join(
                  [
                      'from fastjsonschema import JsonSchemaException',
                      '',
                      '',
                  ]
              )
          regexs = ['"{}": re.compile(r"{}")'.format(key, value.pattern) for key, value in self._compile_regexps.items()]
          return '\n'.join(
              [
                  'import re',
                  'from fastjsonschema import JsonSchemaException',
                  '',
                  '',
                  'REGEX_PATTERNS = {',
                  '    ' + ',\n    '.join(regexs),
                  '}',
                  '',
              ]
          )
docs: Returns global variables for generating function from ``func_code`` as code.
          Includes compiled regular expressions and imports.