Extract dependency definition to shared function