class_docstr: Strategy Compiler.
  
  Currently, this just entails resolving device attributes,
  but this can be easily modified to do more in the future.
docstr: Add a device resolver to resolve devices in the strategy.
docstr_tok: ["Add","a","device","resolver","to","resolve","devices","in","the","strategy","."]
code: def set_device_resolver(self, resolver):
      """Add a device resolver to resolve devices in the strategy."""
      self._device_resolver = resolver
      return self
  
imports: import os
  from abc import ABC, abstractmethod
  from datetime import datetime
  from autodist.const import DEFAULT_SERIALIZATION_DIR
  from autodist.graph_item import GraphItem
  from autodist.kernel.common.utils import get_op_name
  from autodist.proto import strategy_pb2
  from autodist.resource_spec import ResourceSpec
label_desc: Use image node_id 2 for calling the StrategyCompiler obj's underlying member method code with example usage: obj.set_device_resolver(resolver) and returns: self