I realize you didn't write these asserts, but could you convert them into exceptions?  Assertions would be correct if we *know* that `a` can only ever be a `DistArray`, and the assertion is a sanity check to help catch bugs.  Since it's possible for a user to call `ctx.sin("asldfkj")`, these should be exceptions instead.