Parse the Plist file.

def Parse(self, statentry, file_object, knowledge_base):
    """Parse the Plist file."""

    plist = biplist.readPlist(file_object)

    if not isinstance(plist, list):
      raise parser.ParseError(
          "InstallHistory plist is a '%s', expecting a list" % type(plist))

    packages = []
    for sw in plist:
      packages.append(
          rdf_client.SoftwarePackage(
              name=sw.get("displayName"),
              version=sw.get("displayVersion"),
              description=",".join(sw.get("packageIdentifiers")),
              # TODO(hanuszczak): make installed_on an RDFDatetime
              installed_on=_DateToEpoch(sw.get("date")),
              install_state=rdf_client.SoftwarePackage.InstallState.INSTALLED))

    if packages:
      yield rdf_client.SoftwarePackages(packages=packages)