Create an edge property map for weights

I am passing in a graphml file that has the weights of the edges. How do I
create an edge_property_map to either:
-pass in the sum of the weights (using different python code) of the graph
to the degre_property_map?
or
-use the edge_property_map to apply the weights that are in the file? (Can
the egde_property_map gather this information)