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 test_telemetry_run_organizing_init(runner, live_mock_server, parse_ctx):
    with runner.isolated_filesystem():
        wandb.init(name="test_name", tags=["my-tag"], config={"abc": 123}, id="mynewid")
        wandb.finish()

        ctx_util = parse_ctx(live_mock_server.get_ctx())
        telemetry = ctx_util.telemetry

        assert telemetry and 13 in telemetry.get("3", [])  # name
        assert telemetry and 14 in telemetry.get("3", [])  # id
        assert telemetry and 15 in telemetry.get("3", [])  # tags
        assert telemetry and 16 in telemetry.get("3", [])  # config