Allow 'weight' to be callable.
For example, weight=lambda attrs: attrs.get('weight', 0).
Handle nonzero edges via masked arrays.
Also, allow custom multigraph_weight opertor functions.