class_docstr: Holds an operating system and architecture.
class_docstr_tok: ["Holds","an","operating","system","and","architecture","."]
docstr: Generates the fragment of the User-Agent that represents the OS.
  
  Examples:
    (Linux 3.2.5-gg1236)
    (Windows NT 6.1.7601)
    (Macintosh; PPC Mac OS X 12.4.0)
    (Macintosh; Intel Mac OS X 12.4.0)
  
  Returns:
    str, The fragment of the User-Agent string.
docstr_tok: ["Generates","the","fragment","of","the","User-Agent","that","represents","the","OS",".","Examples",":","(","Linux","3.2.5-gg1236",")","(","Windows","NT","6.1.7601",")","(","Macintosh",";","PPC","Mac","OS","X","12.4.0",")","(","Macintosh",";","Intel","Mac","OS","X","12.4.0",")","Returns",":","str",",","The","fragment","of","the","User-Agent","string","."]
code: def UserAgentFragment(self):
      """Generates the fragment of the User-Agent that represents the OS.
  
      Examples:
        (Linux 3.2.5-gg1236)
        (Windows NT 6.1.7601)
        (Macintosh; PPC Mac OS X 12.4.0)
        (Macintosh; Intel Mac OS X 12.4.0)
  
      Returns:
        str, The fragment of the User-Agent string.
      """
      # Below, there are examples of the value of platform.uname() per platform.
      # platform.release() is uname[2], platform.version() is uname[3].
      if self.operating_system == OperatingSystem.LINUX:
          # ('Linux', '<hostname goes here>', '3.2.5-gg1236',
          # '#1 SMP Tue May 21 02:35:06 PDT 2013', 'x86_64', 'x86_64')
          return "({name} {version})".format(
              name=self.operating_system.name,
              version=platform.release(),
          )
      elif self.operating_system == OperatingSystem.WINDOWS:
          # ('Windows', '<hostname goes here>', '7', '6.1.7601', 'AMD64',
          # 'Intel64 Family 6 Model 45 Stepping 7, GenuineIntel')
          return "({name} NT {version})".format(
              name=self.operating_system.name,
              version=platform.version(),
          )
      elif self.operating_system == OperatingSystem.MACOSX:
          # ('Darwin', '<hostname goes here>', '12.4.0',
          # 'Darwin Kernel Version 12.4.0: Wed May  1 17:57:12 PDT 2013;
          # root:xnu-2050.24.15~1/RELEASE_X86_64', 'x86_64', 'i386')
          format_string = "(Macintosh; {name} Mac OS X {version})"
          arch_string = (
              self.architecture.name
              if self.architecture == Architecture.ppc
              else "Intel"
          )
          return format_string.format(
              name=arch_string, version=platform.release()
          )
      else:
          return "()"
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import unicode_literals
  import os
  import platform
  import subprocess
  import sys
label_desc: Use image node_id 4 for calling the Platform obj's underlying member method code with example usage: obj.UserAgentFragment() and returns: str, str, format_string, str