function Component(props) {
  const a = compute(props.a);
  const b = compute(props.b);
  foo(a, b);
  return <Foo a={a} b={b} />;
}
Should produce 1 scope:

return: inputs=props.a & props.b; outputs=return
  const a = compute(props.a);
  const b = compute(props.b);
  foo(a, b);
  return = <Foo a={a} b={b} />