code: def discover_yaml(self):
          
          try:
              import yaml
              self.register('yaml', yaml.load, yaml.dump)
          except ImportError:
              pass
docs: Discovers the YAML format and registers it if available.
  
          Install YAML support via PIP::
  
              pip install PyYAML