class_docstr: Parse a requirement.
  
  Parse a given requirement string into its parts, such as name, specifier,
  URL, and extras. Raises InvalidRequirement on a badly-formed requirement
  string.
class_docstr_tok: ["Parse","a","requirement",".","Parse","a","given","requirement","string","into","its","parts",",","such","as","name",",","specifier",",","URL",",","and","extras",".","Raises","InvalidRequirement","on","a","badly-formed","requirement","string","."]
code: def __str__(self):
      # type: () -> str
      parts = [self.name]  # type: List[str]
  
      if self.extras:
          parts.append("[{0}]".format(",".join(sorted(self.extras))))
  
      if self.specifier:
          parts.append(str(self.specifier))
  
      if self.url:
          parts.append("@ {0}".format(self.url))
          if self.marker:
              parts.append(" ")
  
      if self.marker:
          parts.append("; {0}".format(self.marker))
  
      return "".join(parts)
  
file_path: catboost/contrib/python/packaging/py2/packaging/requirements.py
imports: from __future__ import absolute_import, division, print_function
  import re
  import string
  import sys
  from pyparsing import Combine, Literal, Optional, ParseException, Regex, Word, ZeroOrMore, originalTextFor, stringEnd, stringStart
  from ._typing import TYPE_CHECKING
  from .markers import MARKER_EXPR, Marker
  from .specifiers import LegacySpecifier, Specifier, SpecifierSet
label_desc: Use image node_id 2 for calling the Requirement obj's underlying member method code with example usage: obj.__str__() and returns: str