code: def split_frameworks(code):
      """Split code between the two frameworks (if it has two versions) with PyTorch first."""
      if (
          _re_pytorch.search(code) is None
          or _re_tensorflow.search(code) is None
      ):
          return (code,)
      lines = code.split("\n")
      is_pytorch_first = _re_pytorch.search(lines[0]) is not None
      re_split = _re_tensorflow if is_pytorch_first else _re_pytorch
      i = 1
      while re_split.search(lines[i]) is None:
          i += 1
      j = i - 1
      while len(lines[j]) == 0:
          j -= 1
      return (
          ("\n".join(lines[: j + 1]), "\n".join(lines[i:]))
          if is_pytorch_first
          else ("\n".join(lines[i:]), "\n".join(lines[: j + 1]))
      )
  
imports: import nbformat
  import os
  import re
  import shutil
label_desc: Use image node_id 11 for calling a global function with example usage: split_frameworks(code) and returns: unknown, code