code: def remove_state_keys(state, keys_regex):
      """Remove keys from state that match a regex"""
      regex = re.compile(keys_regex)
      return {k: v for k, v in state.items() if not regex.findall(k)}
  
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 1 for calling a global function with example usage: remove_state_keys(state, keys_regex) and returns: unknown