How do we programmatically place a section and then a block in that region on module install? We are looking for the best way to export a defined/built layout with inline blocks and then use that to programmatically set both them during a module install. 

eg. 


module install 


create node in content type 
apply section
create and apply block to section in node



Currently we are having to print the array, strip UUIDs.. then attach them to the layout field value of the node we create. Which can lead to issues if not cleaned up correctly.
Put this code in an .install file:
// Create a Home web page with alias 'home'.
  $node = Node::create([
    'type' =&gt; '&lt;node_type&gt;',
    'langcode' =&gt; 'en',
    'uid' =&gt; 1,
    'title' =&gt; 'Home',
    'status' =&gt; 1,
    'path' =&gt; [
      'alias' =&gt; '/home',
      'pathauto' =&gt; PathautoState::SKIP,
    ],
  ]);

  // Variable to hold the sections for this node.
  // Defaulting to have a blank section first.
  $sections[] = new Section('layout_onecol');

  // Create a new section.
  $section = new Section('layout_onecol');

  // Config for the multi-type list block.
  $pluginConfiguration = [
    'id' =&gt; '&lt;block_id&gt;',
    'provider' =&gt; 'entity_block',
    'label_display' =&gt; FALSE,
    'view_mode' =&gt; 'default',
  ];

  // Create a new section component using the node and plugin config.
  $component = new SectionComponent($node-&gt;uuid(), 'content', $pluginConfiguration);

  // Add the component to the section.
  $section-&gt;appendComponent($component);

  // Add the section to the sections array.
  $sections[] = $section;

  // Set the sections.
  $node-&gt;layout_builder__layout-&gt;setValue($sections);

  // Save the node.
  $node-&gt;save();