code: def load(self, configuration):
          
          try:
              self.config = yaml.load(open(configuration, "rb"))
          except IOError:
              try:
                  self.config = yaml.load(configuration)
              except ParserError, e:
                  raise ParserError('Error parsing config: %s' % e)
  
          # put customer data into self.customer
          if isinstance(self.config, dict):
              self.customer = self.config.get('customer', {})
              self.instances_dict = self.config.get('instances', {})
              self.web2py_dir = self.config.get('web2py', None)
              self.api_type = self.config.get('api_type', 'jsonrpc')
              self.valid = True
          else:
              self.customer = {}
              self.instances_dict = {}
              self.web2py_dir = None
              self.valid = False
docs: Load a YAML configuration file.
  
          :param configuration: Configuration filename or YAML string