def get_residues(pdb, chain_ids=None):
    """Returns returns residues copied from a PDB.

    Args:
    - pdb - Bio.PDB.Structure.Structure.
    - chain_ids - strip residues from these specific chain_ids only.

    Returns:
    - residues - a list of Bio.PDB.Residue.Residue.
    """
    residues = []
    for model in pdb:
        for chain in model:
            if chain_ids == None or chain.id in chain_ids:
                residues.extend(chain.child_list)
    return residues