def __init__(self, package_json, subprocess_runner, working_copy,
               config_path):
    """Initialize this instance.

    Args:
      package_json: "package" dictionary read from JSON config file.
      subprocess_runner: Subprocess instance used to run commands.
      working_copy: Path to git working copy used to stage changes for this
        package.
      config_path: Path to the file the configuration was read from.

    Raises:
      ConfigJsonError: If an expected key isn't found in the JSON dictionary.
    """
    self.package_json = package_json
    self.dependencies = []
    self.name = '[unknown]'
    self.path = ''
    self.git_remote_upstream = ''
    self.git_remote_local = ''
    self.subprocess_runner = subprocess_runner
    self.working_copy = working_copy
    self.prebuilts = self.package_json.get('prebuilts', 0)
    self.revision = self.package_json.get('revision', '')
    self.fetch_dependencies = self.package_json.get('fetch_dependencies', 0)
    self.config_path = self.package_json.get('config_path', config_path)
    try:
      self.name = self.package_json['name']
      self.url = self.package_json['url']
      self.branch = self.package_json['branch']
      self.is_library = self.package_json['is_library']
      self.third_party = self.package_json['third_party']
      self.push = self.package_json['push']
    except __HOLE__ as e:
      raise ConfigJsonError('Package %s: Unable to find value (%s)' % (
          self.name, str(e)))
dataset/ETHPy150Open google/fplutil/disttools/push_package.py/Package.__init__