docstr: Extend matrix A with column b and return result.
docstr_tok: ["Extend","matrix","A","with","column","b","and","return","result","."]
code: def extend(ctx, A, b):
      """
      Extend matrix A with column b and return result.
      """
      if not isinstance(A, ctx.matrix):
          raise TypeError("A should be a type of ctx.matrix")
      if A.rows != len(b):
          raise ValueError("Value should be equal to len(b)")
      A = A.copy()
      A.cols += 1
      for i in xrange(A.rows):
          A[i, A.cols - 1] = b[i]
      return A
  
imports: from ..libmp.backend import xrange
  import warnings
label_desc: Use image node_id 9 for calling the MatrixMethods obj's underlying member method code with example usage: obj.extend(ctx, A, b) and returns: A