'Returns either HDA or LDDA for hda/ldda and id combination.'

def get_hda_or_ldda(self, trans, hda_ldda, dataset_id):

    if (hda_ldda == 'hda'):
        return self.get_hda(trans, dataset_id, check_ownership=False, check_accessible=True)
    else:
        return self.get_library_dataset_dataset_association(trans, dataset_id)
