code: def add_scheduling_block(config, schema_path=None):
      
  
      if schema_path is None:
          schema_path = os.path.join(os.path.dirname(__file__),
                                     'sbi_post.json')
      schema = load_schema(schema_path)
      jsonschema.validate(config, schema)
  
      # Add the scheduling block to the database
      # (This is done as a single k/v pair here but would probably be
      #  expanded to a set of keys in the actual implementation)
      DB.set('scheduling_block/{}'.format(config['id']), json.dumps(config))
  
      # Add a event to the scheduling block event list to notify
      # of a new scheduling block being added to the db.
      DB.rpush('scheduling_block_events',
               json.dumps(dict(type="created", id=config["id"])))
docs: Add a Scheduling Block to the Configuration Database.
  
      The configuration dictionary must match the schema defined in
      in the schema_path variable at the top of the function.
  
      Args:
          config (dict): Scheduling Block instance request configuration.
          schema_path (str): Path to schema file used to validate the
                             Scheduling Block Instance request