code: def _source_roots_for_target(target):
      
      def root_package_prefix(source_file):
        source = os.path.dirname(source_file)
        return os.path.join(get_buildroot(), target.target_base, source), source.replace(os.sep, '.')
      return {root_package_prefix(source) for source in target.sources_relative_to_source_root()}
docs: :type target:pants.build_graph.target.Target