original_docstring: Context manager to temporarily set output keys.
  
          Example
          -------
          dataset = DynamicItemDataset({"a":{"x":1,"y":2},"b":{"x":3,"y":4}},
          ...     output_keys = ["x"])
          with dataset.output_keys_as(["y"]):
          ...     print(dataset[0])
          {'y': 2}
          print(dataset[0])
          {'x': 1}
  
          NOTE
          ----
          Not thread-safe. While in this context manager, the output keys
          are affected for any call.
          
docstring: Context manager to temporarily set output keys.
  Example
  
  
  
  NOTE
  
  Not thread-safe. While in this context manager, the output keys
  are affected for any call.
docstring_tokens: Context manager to temporarily set output keys . Example NOTE Not thread - safe . While in this context manager the output keys are affected for any call .
code: def output_keys_as(self, keys):
          """Context manager to temporarily set output keys.
  
          Example
          -------
          dataset = DynamicItemDataset({"a":{"x":1,"y":2},"b":{"x":3,"y":4}},
          ...     output_keys = ["x"])
          with dataset.output_keys_as(["y"]):
          ...     print(dataset[0])
          {'y': 2}
          print(dataset[0])
          {'x': 1}
  
          NOTE
          ----
          Not thread-safe. While in this context manager, the output keys
          are affected for any call.
          """
          saved_output = self.pipeline.output_mapping
          self.pipeline.set_output_keys(keys)
          yield self
          self.pipeline.set_output_keys(saved_output)
code_tokens: def output_keys_as ( self , keys ) : saved_output = self . pipeline . output_mapping self . pipeline . set_output_keys ( keys ) yield self self . pipeline . set_output_keys ( saved_output )
short_docstring: Context manager to temporarily set output keys.
short_docstring_tokens: Context manager to temporarily set output keys .
comment: """Context manager to temporarily set output keys.
  
          Example
          -------
          dataset = DynamicItemDataset({"a":{"x":1,"y":2},"b":{"x":3,"y":4}},
          ...     output_keys = ["x"])
          with dataset.output_keys_as(["y"]):
          ...     print(dataset[0])
          {'y': 2}
          print(dataset[0])
          {'x': 1}
  
          NOTE
          ----
          Not thread-safe. While in this context manager, the output keys
          are affected for any call.
          """