code: def check_state_keys(state, keys_regex):
      """check if keys exists in state using full python paths"""
      regex = re.compile(keys_regex)
      for k, v in state.items():
          if regex.findall(k):
              return True
      return False
  
imports: import re
  from typing import List, Optional
  import torch
  from pytext.utils.usage import log_class_usage
  from pytorch.text.fb.nn.modules.transformer import Transformer
  from torch import nn
label_desc: Use image node_id 4 for calling a global function with example usage: check_state_keys(state, keys_regex) and returns: False, True