# tff.structure.pack_sequence_as

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/federated/blob/v0.87.0 Version 2.0, January 2004 Licensed under the Apache License, Version 2.0 (the) |

Returns a list of values in a possibly recursively nested `Struct`.

    tff.structure.pack_sequence_as(
        structure: Struct[_T], flat_sequence: list[_T]
    ) -> Struct[_T]

<br />

<br />

<br />

| ## Args ||
|---|---|
| `structure` | A `Struct`, possibly recursively nested. |
| `flat_sequence` | A flat Python list of values. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| A `Struct` nested the same way as `structure`, but with leaves replaced with `flat_sequence` such that when flatten, it yields a list with the same contents as `flat_sequence`. ||

<br />