def load(self, filename, create_if_missing=True):
        filename = Path(filename)
        if not filename.exists() and create_if_missing:
            self.load_pip_requirements()
            with filename.open("w") as f:
                f.write(yaml.dump(self.serialized, default_flow_style=False,
                                  encoding=None))
            self.filename = filename
            return self.save(filename)
        with filename.open() as f:
            for group, requirements in yaml.load(f.read()).items():
                for requirement in requirements:
                    self[group].add(Requirement.coerce(requirement))
        self.filename = filename
def approve(self, user_id=None, service=""):
        """
        Approve the verification attempt for user

        Valid attempt statuses when calling this method:
            `submitted`, `approved`, `denied`

        After method completes:
            status is set to `approved`
            expiry_date is set to one year from now
        """
        self.expiry_date = now() + timedelta(
            days=settings.VERIFY_STUDENT["DAYS_GOOD_FOR"]
        )
        super(SoftwareSecurePhotoVerification, self).approve(user_id, service)