code: def _evaluate_markers(
      markers: List[Any], environment: Dict[str, str]
  ) -> bool:
      groups: List[List[bool]] = [[]]
  
      for marker in markers:
          assert isinstance(marker, (list, tuple, str))
  
          if isinstance(marker, list):
              groups[-1].append(_evaluate_markers(marker, environment))
          elif isinstance(marker, tuple):
              lhs, op, rhs = marker
  
              if isinstance(lhs, Variable):
                  lhs_value = _get_env(environment, lhs.value)
                  rhs_value = rhs.value
              else:
                  lhs_value = lhs.value
                  rhs_value = _get_env(environment, rhs.value)
  
              groups[-1].append(_eval_op(lhs_value, op, rhs_value))
          else:
              assert marker in ["and", "or"]
              if marker == "or":
                  groups.append([])
  
      return any(all(item) for item in groups)
  
imports: import operator
  import os
  import platform
  import sys
  from typing import Any, Callable, Dict, List, Optional, Tuple, Union
  from pyparsing import Forward, Group, Literal, ParseException, ParseResults, QuotedString, ZeroOrMore, stringEnd, stringStart
  from .specifiers import InvalidSpecifier, Specifier
label_desc: Use image node_id 5 for calling a global function with example usage: _evaluate_markers(markers, environment) and returns: any