Deduplicate logic for merging of child contexts.
Deduplicate logic for merging of child contexts.

Summary:
We used to manually merge the fields of a child context that contains collected
info from an `include_def`'d file. It's easy to make mistakes when adding a new
field that has to be merged, since all callsites has to be updated (for example,
environment variable and configs used in implicit includes were getting
ignored).

This diff puts all that logic into the previously created abstract base class.

This diff also adds type annotations in docstrings that are sphinx conformant
and can be picked up by intellij pycharms.

Test Plan: CI

Reviewed By: bhamiltoncx

fbshipit-source-id: 8451bd3

robbertvanginkel/buck,facebook/buck,davido/buck,SeleniumHQ/buck,nguyentruongtho/buck,ilya-klyuchnikov/buck,shybovycha/buck,justinmuller/buck,ilya-klyuchnikov/buck,rmaz/buck,kageiit/buck,daedric/buck,justinmuller/buck,robbertvanginkel/buck,justinmuller/buck,zhan-xiong/buck,sdwilsh/buck,marcinkwiatkowski/buck,SeleniumHQ/buck,SeleniumHQ/buck,justinmuller/buck,clonetwin26/buck,zhan-xiong/buck,vschs007/buck,clonetwin26/buck,ilya-klyuchnikov/buck,davido/buck,romanoid/buck,sdwilsh/buck,Addepar/buck,facebook/buck,kageiit/buck,brettwooldridge/buck,shybovycha/buck,shybovycha/buck,daedric/buck,daedric/buck,romanoid/buck,davido/buck,zhan-xiong/buck,Addepar/buck,daedric/buck,k21/buck,JoelMarcey/buck,ilya-klyuchnikov/buck,clonetwin26/buck,zhan-xiong/buck,shybovycha/buck,vschs007/buck,ilya-klyuchnikov/buck,k21/buck,LegNeato/buck,k21/buck,shs96c/buck,zpao/buck,clonetwin26/buck,LegNeato/buck,grumpyjames/buck,romanoid/buck,dsyang/buck,nguyentruongtho/buck,davido/buck,clonetwin26/buck,shs96c/buck,shs96c/buck,grumpyjames/buck,clonetwin26/buck,clonetwin26/buck,grumpyjames/buck,zpao/buck,k21/buck,nguyentruongtho/buck,davido/buck,sdwilsh/buck,LegNeato/buck,darkforestzero/buck,dsyang/buck,justinmuller/buck,marcinkwiatkowski/buck,justinmuller/buck,justinmuller/buck,Addepar/buck,clonetwin26/buck,zhan-xiong/buck,justinmuller/buck,grumpyjames/buck,LegNeato/buck,dsyang/buck,ilya-klyuchnikov/buck,k21/buck,LegNeato/buck,davido/buck,ilya-klyuchnikov/buck,vschs007/buck,SeleniumHQ/buck,JoelMarcey/buck,marcinkwiatkowski/buck,zpao/buck,robbertvanginkel/buck,vschs007/buck,SeleniumHQ/buck,SeleniumHQ/buck,romanoid/buck,dsyang/buck,shybovycha/buck,SeleniumHQ/buck,JoelMarcey/buck,LegNeato/buck,LegNeato/buck,nguyentruongtho/buck,justinmuller/buck,vschs007/buck,JoelMarcey/buck,clonetwin26/buck,romanoid/buck,shybovycha/buck,rmaz/buck,rmaz/buck,k21/buck,shybovycha/buck,darkforestzero/buck,grumpyjames/buck,daedric/buck,marcinkwiatkowski/buck,Addepar/buck,vschs007/buck,brettwooldridge/buck,LegNeato/buck,daedric/buck,romanoid/buck,kageiit/buck,k21/buck,marcinkwiatkowski/buck,zhan-xiong/buck,nguyentruongtho/buck,vschs007/buck,daedric/buck,Addepar/buck,sdwilsh/buck,Addepar/buck,brettwooldridge/buck,dsyang/buck,shs96c/buck,shs96c/buck,SeleniumHQ/buck,shs96c/buck,brettwooldridge/buck,grumpyjames/buck,romanoid/buck,daedric/buck,romanoid/buck,Addepar/buck,darkforestzero/buck,marcinkwiatkowski/buck,robbertvanginkel/buck,ilya-klyuchnikov/buck,zhan-xiong/buck,JoelMarcey/buck,SeleniumHQ/buck,rmaz/buck,brettwooldridge/buck,shs96c/buck,JoelMarcey/buck,davido/buck,k21/buck,romanoid/buck,Addepar/buck,grumpyjames/buck,dsyang/buck,SeleniumHQ/buck,clonetwin26/buck,shs96c/buck,brettwooldridge/buck,robbertvanginkel/buck,zhan-xiong/buck,dsyang/buck,marcinkwiatkowski/buck,marcinkwiatkowski/buck,sdwilsh/buck,sdwilsh/buck,LegNeato/buck,facebook/buck,zhan-xiong/buck,vschs007/buck,brettwooldridge/buck,zhan-xiong/buck,darkforestzero/buck,ilya-klyuchnikov/buck,sdwilsh/buck,k21/buck,justinmuller/buck,zhan-xiong/buck,kageiit/buck,ilya-klyuchnikov/buck,facebook/buck,grumpyjames/buck,daedric/buck,robbertvanginkel/buck,nguyentruongtho/buck,LegNeato/buck,grumpyjames/buck,brettwooldridge/buck,davido/buck,davido/buck,rmaz/buck,ilya-klyuchnikov/buck,k21/buck,rmaz/buck,zhan-xiong/buck,robbertvanginkel/buck,JoelMarcey/buck,shybovycha/buck,darkforestzero/buck,dsyang/buck,vschs007/buck,justinmuller/buck,daedric/buck,shs96c/buck,vschs007/buck,JoelMarcey/buck,brettwooldridge/buck,robbertvanginkel/buck,SeleniumHQ/buck,marcinkwiatkowski/buck,marcinkwiatkowski/buck,romanoid/buck,SeleniumHQ/buck,sdwilsh/buck,romanoid/buck,ilya-klyuchnikov/buck,darkforestzero/buck,daedric/buck,JoelMarcey/buck,zpao/buck,darkforestzero/buck,rmaz/buck,davido/buck,justinmuller/buck,sdwilsh/buck,JoelMarcey/buck,Addepar/buck,shybovycha/buck,marcinkwiatkowski/buck,davido/buck,nguyentruongtho/buck,dsyang/buck,dsyang/buck,facebook/buck,k21/buck,SeleniumHQ/buck,sdwilsh/buck,LegNeato/buck,davido/buck,Addepar/buck,shs96c/buck,JoelMarcey/buck,Addepar/buck,dsyang/buck,darkforestzero/buck,kageiit/buck,shs96c/buck,kageiit/buck,rmaz/buck,brettwooldridge/buck,LegNeato/buck,daedric/buck,darkforestzero/buck,brettwooldridge/buck,rmaz/buck,darkforestzero/buck,k21/buck,marcinkwiatkowski/buck,robbertvanginkel/buck,sdwilsh/buck,daedric/buck,shybovycha/buck,romanoid/buck,sdwilsh/buck,facebook/buck,Addepar/buck,darkforestzero/buck,robbertvanginkel/buck,rmaz/buck,sdwilsh/buck,shs96c/buck,robbertvanginkel/buck,grumpyjames/buck,LegNeato/buck,marcinkwiatkowski/buck,dsyang/buck,zpao/buck,JoelMarcey/buck,shybovycha/buck,ilya-klyuchnikov/buck,JoelMarcey/buck,clonetwin26/buck,darkforestzero/buck,romanoid/buck,brettwooldridge/buck,grumpyjames/buck,grumpyjames/buck,clonetwin26/buck,zhan-xiong/buck,zpao/buck,shybovycha/buck,clonetwin26/buck,vschs007/buck,shs96c/buck,zpao/buck,kageiit/buck,robbertvanginkel/buck,justinmuller/buck,vschs007/buck,dsyang/buck,k21/buck,facebook/buck,rmaz/buck,darkforestzero/buck,davido/buck,Addepar/buck,rmaz/buck,brettwooldridge/buck,vschs007/buck,robbertvanginkel/buck,rmaz/buck,shybovycha/buck