code: def _optional_envs():
      
      envs = {
          key: os.environ.get(key)
          for key in OPTIONAL_ENV_VARS
          if key in os.environ
      }
  
      # If we're using Jenkins, check that we have all the required info
      if 'JOB_NAME' in envs and 'BUILD_NUMBER' not in envs:
          raise BrowserConfigError("Missing BUILD_NUMBER environment var")
  
      if 'BUILD_NUMBER' in envs and 'JOB_NAME' not in envs:
          raise BrowserConfigError("Missing JOB_NAME environment var")
  
      return envs
docs: Parse environment variables for optional values,
      raising a `BrowserConfig` error if they are insufficiently specified.
  
      Returns a `dict` of environment variables.