code: def find_program_name():
      
      # Gotcha: sys.argv[0] is '-c' if Python is started with the -c option.
      return ((os.path.basename(sys.argv[0]) if sys.argv and sys.argv[0] != '-c' else '') or
              (os.path.basename(sys.executable) if sys.executable else '') or
              'python')
docs: Select a suitable program name to embed in log messages.
  
      :returns: One of the following strings (in decreasing order of preference):
  
                1. The base name of the currently running Python program or
                   script (based on the value at index zero of :data:`sys.argv`).
                2. The base name of the Python executable (based on
                   :data:`sys.executable`).
                3. The string 'python'.