docstr: Replace the ScopedLocation by the one provided.
  
  :param loc: ScopedLocation
  :return: an AutoMLContext copy with the new loc attribute.
docstr_tok: ["Replace","the","ScopedLocation","by","the","one","provided",".",":","param","loc",":","ScopedLocation",":","return",":","an","AutoMLContext","copy","with","the","new","loc","attribute","."]
code: def with_loc(self, loc: ScopedLocation) -> "AutoMLContext":
      """
      Replace the ScopedLocation by the one provided.
  
      :param loc: ScopedLocation
      :return: an AutoMLContext copy with the new loc attribute.
      """
      new_self: AutoMLContext = self._copy()
      new_self.register_service(ScopedLocation, loc)
      return new_self
  
imports: import logging
  from neuraxle.base import ExecutionContext, ExecutionPhase
  from neuraxle.logging.logging import NeuraxleLogger
  from neuraxle.metaopt.data.vanilla import BaseDataclass, ScopedLocation, SubDataclassT
  from neuraxle.metaopt.repositories.repo import HyperparamsRepository, SynchronizedHyperparamsRepositoryWrapper, VanillaHyperparamsRepository
label_desc: Use image node_id 17 for calling the AutoMLContext obj's underlying member method code with example usage: obj.with_loc(loc) and returns: new_self