def _get_python_thrift_library_sources(self, py_thrift_targets):
    """Get file contents for python thrift library targets."""
    target_snapshots = OrderedDict(
      (t, t.sources_snapshot(scheduler=self.context._scheduler).directory_digest)
      for t in py_thrift_targets)
    filescontent_by_target = OrderedDict(zip(
      target_snapshots.keys(),
      self.context._scheduler.product_request(FilesContent, target_snapshots.values())))
    thrift_file_sources_by_target = OrderedDict(
      (t, [(file_content.path, file_content.content) for file_content in all_content.dependencies])
      for t, all_content in filescontent_by_target.items())
    return thrift_file_sources_by_target
Get file contents for python thrift library targets.