This can be in one if statement above

```go
if nsname, exists := n.Context["nsname"]; exists {
     context["nspath"] = fmt.Sprintf("/var/run/netns/%s", nsname)
}
return fmt.Errorf("nspath does not exist in network context")