I've been playing around with custom arcs, but I can't seem to figure out how to set the arc radius automatically. Goal is to create a node that bounds two semi-circles and gets wider as needed
Links to the desired image at at the end
https://i.stack.imgur.com/E4qag.jpg
\usepackage{xparse}
\NewDocumentCommand{\mynode}{%
O{}
m
m
m
O{}
}{
{
\node [#1] (#2) at #3 {#4};
\def\ra{.3cm}
\draw [#5] (#2.north west) arc
[
start angle=90,
end angle=270,
x radius=\ra,
y radius=\ra
] ;
\draw [#5] (#2.north east)to [in=0,out=180] (#2.north west);
\draw [#5] (#2.south east)to [in=0,out=180] (#2.south west);
\draw [#5] (#2.south east) arc
[
start angle=270,
end angle=450,
x radius=\ra,
y radius=\ra
] ;
}
}

