def METHOD_NAME(self, block_type, b_obj=None):
    """Helper function to create a new block, register it in the list of
    exported blocks, and associate it with a Blender object.
    @param block_type: The nif block type (for instance "NiNode").
    @type block_type: C{str}
    @param b_obj: The Blender object.
    @return: The newly created block."""
    try:
        block = NifFormat.niobject_map[block_type](NifData.data)
    except AttributeError:
        raise io_scene_niftools.utils.logging.NifError(f"'{block_type}': Unknown block type (this is probably a bug).")
    return self.register_block(block, b_obj)