code: def _paths_from_assignment(module_context, expr_stmt):
      """
      Extracts the assigned strings from an assignment that looks as follows::
  
          sys.path[0:0] = ['module/path', 'another/module/path']
  
      This function is in general pretty tolerant (and therefore 'buggy').
      However, it's not a big issue usually to add more paths to Jedi's sys_path,
      because it will only affect Jedi in very random situations and by adding
      more paths than necessary, it usually benefits the general user.
      """
      for assignee, operator in zip(
          expr_stmt.children[::2], expr_stmt.children[1::2]
      ):
          try:
              assert operator in ["=", "+="]
              assert (
                  assignee.type in ("power", "atom_expr")
                  and len(assignee.children) > 1
              )
              c = assignee.children
              assert c[0].type == "name" and c[0].value == "sys"
              trailer = c[1]
              assert (
                  trailer.children[0] == "."
                  and trailer.children[1].value == "path"
              )
              # TODO Essentially we're not checking details on sys.path
              # manipulation. Both assigment of the sys.path and changing/adding
              # parts of the sys.path are the same: They get added to the end of
              # the current sys.path.
              """
              execution = c[2]
              assert execution.children[0] == '['
              subscript = execution.children[1]
              assert subscript.type == 'subscript'
              assert ':' in subscript.children
              """
          except AssertionError:
              continue
  
          cn = ContextualizedNode(
              module_context.create_context(expr_stmt), expr_stmt
          )
          for lazy_context in cn.infer().iterate(cn):
              for context in lazy_context.infer():
                  if is_string(context):
                      abs_path = _abs_path(
                          module_context, context.get_safe_value()
                      )
                      if abs_path is not None:
                          yield abs_path
  
file_path: catboost/contrib/python/jedi/py3/jedi/evaluate/sys_path.py
imports: import os
  from jedi._compatibility import unicode, force_unicode, all_suffixes
  from jedi.evaluate.cache import evaluator_method_cache
  from jedi.evaluate.base_context import ContextualizedNode
  from jedi.evaluate.helpers import is_string
  from jedi.common.utils import traverse_parents
  from jedi.parser_utils import get_cached_code_lines
  from jedi import settings
  from jedi import debug
label_desc: Use image node_id 2 for calling a global function with example usage: _paths_from_assignment(module_context, expr_stmt) without return types