code: func (r *resourceAllocator) DetachNetwork(ctx context.Context, aID string) error {
  	return r.agent.withSession(ctx, func(session *session) error {
  		client := api.NewResourceAllocatorClient(session.conn.ClientConn)
  		_, err := client.DetachNetwork(ctx, &api.DetachNetworkRequest{
  			AttachmentID: aID,
  		})
  
  		return err
  	})
  }
docs: // DetachNetwork deletes a network attachment.