code: def path(self) -> Path:
      if self.__path:
          p = self.__path
      elif Platform.linux():
          p = "/etc/hosts"
      elif Platform.macos():
          new_hosts = "/etc/hosts"
          old_hosts = "/private/etc/hosts"
          p = new_hosts if os.path.exists(new_hosts) else old_hosts
      elif Platform.windows():
          p = "C:\Windows\System32\drivers\etc\hosts"
      else:
          raise Exception(f"Unsupported OS: {Platform.system}")
  
      p = Path(p).absolute()
      assert p.exists(), "Host file does not exist"
      return p
  
imports: import argparse
  from functools import cached_property
  import os
  from pathlib import Path
  import platform
  import re
  import sys
label_desc: Use image node_id 2 for calling the Hosts obj's underlying member method code with example usage: obj.path() and returns: p