Factor out a function which reads a file
Factor out a function which reads a file

Summary: I'm going to use this in the next diff

Reviewed By: gabelevi

Differential Revision: D13600008

fbshipit-source-id: a82170bedd362a486d30602a8b13cc3bf4734db3

mroch/flow,facebook/flow,AgentME/flow,mroch/flow,mroch/flow,AgentME/flow,popham/flow,AgentME/flow,facebook/flow,AgentME/flow,facebook/flow,popham/flow,popham/flow,samwgoldman/flow,samwgoldman/flow,samwgoldman/flow,mroch/flow,facebook/flow,popham/flow,samwgoldman/flow,mroch/flow,popham/flow,gabelevi/flow,facebook/flow,mroch/flow,facebook/flow,popham/flow,gabelevi/flow,samwgoldman/flow,gabelevi/flow,facebook/flow,popham/flow,mroch/flow,samwgoldman/flow,AgentME/flow,gabelevi/flow,gabelevi/flow,gabelevi/flow,samwgoldman/flow,gabelevi/flow