code: def open_if_not_none(
      file_path: str, file_mode: str
  ) -> ContextManager:
      if file_path is not None:
          return open(file_path, file_mode)
      else:
          return backported_nullcontext()
  
file_path: vowpal_wabbit/utl/active_interactor.py
imports: import socket
  import argparse
  from typing import Callable, ContextManager, Optional, TextIO
  import contextlib
label_desc: Use image node_id 10 for calling a global function with example usage: open_if_not_none(file_path, file_mode) and returns: open, backported_nullcontext