docstr: Parses `packages` option value.
  
  :param value:
  :rtype: list
docstr_tok: ["Parses","`","packages","`","option","value",".",":","param","value",":",":","rtype",":","list"]
code: def _parse_packages(self, value):
      """Parses `packages` option value.
  
      :param value:
      :rtype: list
      """
      find_directives = ["find:", "find_namespace:"]
      trimmed_value = value.strip()
  
      if trimmed_value not in find_directives:
          return self._parse_list(value)
  
      findns = trimmed_value == find_directives[1]
      if findns and not PY3:
          raise DistutilsOptionError(
              "find_namespace: directive is unsupported on Python < 3.3"
          )
  
      # Read function arguments from a dedicated section.
      find_kwargs = self.parse_section_packages__find(
          self.sections.get("packages.find", {})
      )
  
      if findns:
          from setuptools import (
              find_namespace_packages as find_packages,
          )
      else:
          from setuptools import find_packages
  
      return find_packages(**find_kwargs)
  
imports: from __future__ import absolute_import, unicode_literals
  import io
  import os
  import sys
  import warnings
  import functools
  from collections import defaultdict
  from functools import partial
  from functools import wraps
  from importlib import import_module
  from distutils.errors import DistutilsOptionError, DistutilsFileError
  from setuptools.extern.packaging.version import LegacyVersion, parse
  from setuptools.extern.packaging.specifiers import SpecifierSet
  from setuptools.extern.six import string_types, PY3
label_desc: Use image node_id 2 for calling the ConfigOptionsHandler obj's underlying member method code with example usage: obj._parse_packages(value) and returns: find_packages, self