Codebook design and beam training for extremely large-scale RIS: Far-field or near-field? | Synapse