def find_orig_service_item_ids(portal, services_pub_info):
    for service_pub_info in services_pub_info:
        service_pub_info['origServiceItemId'] = None
        target_item_id = service_pub_info.get('serviceItemId')
        src_item_id = find_orig_service_item_id(portal, target_item_id)
        if src_item_id:
            service_pub_info['origServiceItemId'] = src_item_id
    
    return services_pub_info
Retrieves and validates machine metadata.
dataset/ETHPy150Open Esri/ops-server-config/Publish/Portal/PublishHostedServices.py/find_orig_service_item_ids--crossover with--dataset/ETHPy150Open google/cauliflowervest/src/cauliflowervest/client/base_client.py/CauliflowerVestClient.GetAndValidateMetadata