def get_owner_username(domain, owner_type, facility_id):
    if not owner_type:
        return ''
    facility_index_by_domain = indexed_facilities()
    try:
        return facility_index_by_domain[domain][facility_id][owner_type]
    except __HOLE__:
        return None
dataset/ETHPy150Open dimagi/commcare-hq/custom/_legacy/hsph/tasks.py/get_owner_username