code: def _get_safe_value_or_none(context, accept):
      if is_compiled(context):
          value = context.get_safe_value(default=None)
          if isinstance(value, accept):
              return value
  
imports: import copy
  import sys
  import re
  import os
  from itertools import chain
  from contextlib import contextmanager
  from parso.python import tree
  from jedi._compatibility import unicode
  from jedi.parser_utils import get_parent_scope
label_desc: Use image node_id 11 for calling a global function with example usage: _get_safe_value_or_none(context, accept) and returns: value