def METHOD_NAME(self):
    """Login as the specific installation of a GitHub App."""
    if (
        self.current_cassette.is_recording()
        and self.private_key_bytes
        and self.app_id
        and self.app_installation_id
    ):
        self.gh.login_as_app_installation(
            self.private_key_bytes,
            app_id=self.app_id,
            installation_id=self.app_installation_id,
        )
        token = self.gh.session.auth.token
    else:
        token = "v1.{}".format("x" * 10)
        now = datetime.datetime.now(tz=dateutil.tz.UTC)
        expires_at_dt = now + datetime.timedelta(seconds=60 * 60)
        expires_at = expires_at_dt.isoformat()
        self.gh.session.app_installation_token_auth(
            {"token": token, "expires_at": expires_at}
        )
    self.current_cassette.placeholders.append(
        cassette.Placeholder("<INSTALLATION_TOKEN>", token)
    )