Angular material tab

How can I modify angular tab is like that? I couldn’t make the borders like this.I can do it normally but I couldn’t do it for mat-tab. If there are more than 2, how can I do it to support the middle one?

    <mat-tab-group>
    <mat-tab label="tab 1">

    </mat-tab>
    <mat-tab label="tab 2">

    </mat-tab>
</mat-tab-group>

Desired Output

enter image description here