code: def behaviors(behaviors_dir=None):
      
      import os, yaml, string
      global _behaviors
      if _behaviors is None:
          d = behaviors_dir or os.path.dirname(__file__)
          behaviors_yaml = os.path.join(d, 'behaviors.yaml')
          with open(behaviors_yaml) as fin:
              _behaviors = yaml.safe_load(fin)
      return _behaviors
docs: Return list of JS behaviors loaded from YAML file.
  
      :param behaviors_dir: Directory containing `behaviors.yaml` and
      `js-templates/`. Defaults to brozzler dir.