How to close opened mat tree when we click on another mat-tree in angular 7 [on hold]

I need to close, opened mat-tree node when I open another mat-tree node. If I open node 1, on click of node2, the node 1 should close. Similarly for its children too.

https://stackblitz.com/angular/lrvqmlyvabd?file=app%2Ftree-nested-overview-example.ts

code :
.ts

interface FoodNode {
name: string;
children?: FoodNode[];
}
const TREE_DATA: FoodNode[] = [
{
name: 'Fruit',
children: [
      {name: 'Apple'},
      {name: 'Banana'},
      {name: 'Fruit loops'},
    ]
  }, {
    name: 'Vegetables',
    children: [
      {
        name: 'Green',
        children: [
          {name: 'Broccoli'},
          {name: 'Brussel sprouts'},
        ]
      }, {
        name: 'Orange',
        children: [
          {name: 'Pumpkins'},
          {name: 'Carrots'},
        ]
      },
    ]
  },
];
export class TreeNestedOverviewExample {
  treeControl = new NestedTreeControl<FoodNode>(node => node.children);
  dataSource = new MatTreeNestedDataSource<FoodNode>();
  constructor() {
    this.dataSource.data = TREE_DATA;
  }

  hasChild = (_: number, node: FoodNode) => !!node.children && node.children.length > 0;
}

Source: New feed
Source Url How to close opened mat tree when we click on another mat-tree in angular 7 [on hold]