code: def registerBehavior(behavior, name=None, default=False, id=None):
      
      if not name:
          name = behavior.name.upper()
      if id is None:
          id = behavior.versionString
      if name in __behaviorRegistry:
          if default:
              __behaviorRegistry[name].insert(0, (id, behavior))
          else:
              __behaviorRegistry[name].append((id, behavior))
      else:
          __behaviorRegistry[name] = [(id, behavior)]
docs: Register the given behavior.
  
      If default is True (or if this is the first version registered with this
      name), the version will be the default if no id is given.