def METHOD_NAME(self, stop_time, result):
    if result:
        if not isinstance(result, tuple):
            result = (
                result,
            )  # transform single result to tuple so that both single & multiple results use same code
        for i, r in enumerate(result):
            if isinstance(r, float) or isinstance(r, int):
                wandb.log({f"result_{i}": float(r)})
            elif isinstance(r, dict):
                wandb.log(r)
            elif isinstance(r, object):
                artifact = wandb.Artifact(f"result_{i}.pkl", type="result")
                artifact.add_file(r)
                self.run.log_artifact(artifact)
            elif isinstance(r, numpy.ndarray):
                wandb.log({f"result_{i}": wandb.Image(r)})
            else:
                warnings.warn(
                    "logging results does not support type '{}' results. Ignoring this result".format(
                        type(r),
                    ),
                    stacklevel=2,
                )