def build_superblock(chanjo_db, block_group):
  """Create a new superblock and add it to the current session.

  Args:
    chanjo_db (Store): Chanjo store connected to an existing database
    block_group (list): group of related database blocks

  Returns:
    object: new database block
  """
  superblock_id, some_block = block_group[0]

  # create a brand new superblock
  new_superblock = chanjo_db.create(
    'superblock',
    superblock_id=superblock_id,
    contig=some_block.contig,
    start=min([payload[1].start for payload in block_group]),
    end=max([payload[1].end for payload in block_group]),
    strand=some_block.strand
  )

  # add the new superblock to the current session
  chanjo_db.add(new_superblock)

  # relate the blocks to the superblock
  new_superblock.blocks = [block for _, block in block_group]

  return new_superblock