class_docstr: A class for managing the decision process around violations.
  
  This contains the logic for whether a violation should be reported or
  ignored.
docstr: Decide if code should be ignored or selected.
docstr_tok: ["Decide","if","code","should","be","ignored","or","selected","."]
code: def make_decision(self, code: str) -> Decision:
      """Decide if code should be ignored or selected."""
      selected = self.was_selected(code)
      ignored = self.was_ignored(code)
      LOG.debug(
          "The user configured %r to be %r, %r",
          code,
          selected,
          ignored,
      )
  
      if isinstance(selected, Selected) and isinstance(
          ignored, Selected
      ):
          return Decision.Selected
      elif isinstance(selected, Ignored) and isinstance(
          ignored, Ignored
      ):
          return Decision.Ignored
      elif (
          selected is Selected.Explicitly
          and ignored is not Ignored.Explicitly
      ):
          return Decision.Selected
      elif (
          selected is not Selected.Explicitly
          and ignored is Ignored.Explicitly
      ):
          return Decision.Ignored
      elif (
          selected is Ignored.Implicitly
          and ignored is Selected.Implicitly
      ):
          return Decision.Ignored
      elif (
          selected is Selected.Explicitly
          and ignored is Ignored.Explicitly
      ) or (
          selected is Selected.Implicitly
          and ignored is Ignored.Implicitly
      ):
          # we only get here if it was in both lists: longest prefix wins
          select = next(s for s in self.selected if code.startswith(s))
          ignore = next(s for s in self.ignored if code.startswith(s))
          if len(select) > len(ignore):
              return Decision.Selected
          else:
              return Decision.Ignored
      else:
          raise AssertionError(
              f"unreachable {code} {selected} {ignored}"
          )
  
imports: from __future__ import annotations
  import argparse
  import contextlib
  import copy
  import enum
  import functools
  import logging
  from typing import Generator
  from typing import Sequence
  from flake8 import defaults
  from flake8 import statistics
  from flake8 import utils
  from flake8.formatting import base
  from flake8.violation import Violation
label_desc: Use image node_id 4 for calling the DecisionEngine obj's underlying member method code with example usage: obj.make_decision(code) and returns: Decision, Decision, Decision, Decision, Decision, Decision, Decision