Functional Structure in Production Networks