class_docstr: Elementwise product of matrix expressions
  
  Examples
  ========
  
  Hadamard product for matrix symbols:
  
  >>> from sympy import hadamard_product, HadamardProduct, MatrixSymbol
  >>> A = MatrixSymbol('A', 5, 5)
  >>> B = MatrixSymbol('B', 5, 5)
  >>> isinstance(hadamard_product(A, B), HadamardProduct)
  True
  
  Notes
  =====
  
  This is a symbolic object that simply stores its argument without
  evaluating it. To actually compute the product, use the function
  ``hadamard_product()`` or ``HadamardProduct.doit``
class_docstr_tok: ["Elementwise","product","of","matrix","expressions","Examples","========","Hadamard","product","for","matrix","symbols",":",">",">",">","from","sympy","import","hadamard_product",",","HadamardProduct",",","MatrixSymbol",">",">",">","A","=","MatrixSymbol","(","'","A","'",",","5",",","5",")",">",">",">","B","=","MatrixSymbol","(","'","B","'",",","5",",","5",")",">",">",">","isinstance","(","hadamard_product","(","A",",","B",")",",","HadamardProduct",")","True","Notes","=====","This","is","a","symbolic","object","that","simply","stores","its","argument","without","evaluating","it",".","To","actually","compute","the","product",",","use","the","function","``","hadamard_product","(",")","``","or","``","HadamardProduct.doit","``"]
code: def _eval_derivative_matrix_lines(self, x):
      from sympy.tensor.array.expressions.array_expressions import (
          ArrayDiagonal,
      )
      from sympy.tensor.array.expressions.array_expressions import (
          ArrayTensorProduct,
      )
      from sympy.matrices.expressions.matexpr import _make_matrix
  
      with_x_ind = [i for i, arg in enumerate(self.args) if arg.has(x)]
      lines = []
      for ind in with_x_ind:
          left_args = self.args[:ind]
          right_args = self.args[ind + 1 :]
  
          d = self.args[ind]._eval_derivative_matrix_lines(x)
          hadam = hadamard_product(*(right_args + left_args))
          diagonal = [(0, 2), (3, 4)]
          diagonal = [
              e for j, e in enumerate(diagonal) if self.shape[j] != 1
          ]
          for i in d:
              l1 = i._lines[i._first_line_index]
              l2 = i._lines[i._second_line_index]
              subexpr = ExprBuilder(
                  ArrayDiagonal,
                  [
                      ExprBuilder(
                          ArrayTensorProduct,
                          [
                              ExprBuilder(_make_matrix, [l1]),
                              hadam,
                              ExprBuilder(_make_matrix, [l2]),
                          ],
                      ),
                      *diagonal,
                  ],
              )
              i._first_pointer_parent = subexpr.args[0].args[0].args
              i._first_pointer_index = 0
              i._second_pointer_parent = subexpr.args[0].args[2].args
              i._second_pointer_index = 0
              i._lines = [subexpr]
              lines.append(i)
  
      return lines
  
imports: from collections import Counter
  from sympy.core import Mul, sympify
  from sympy.core.add import Add
  from sympy.core.expr import ExprBuilder
  from sympy.core.sorting import default_sort_key
  from sympy.functions.elementary.exponential import log
  from sympy.matrices.expressions.matexpr import MatrixExpr
  from sympy.matrices.expressions._shape import validate_matadd_integer
  from sympy.matrices.expressions.special import ZeroMatrix, OneMatrix
  from sympy.strategies import unpack, flatten, condition, exhaust, rm_id, sort
  from sympy.utilities.exceptions import sympy_deprecation_warning
label_desc: Use image node_id 7 for calling the HadamardProduct obj's underlying member method code with example usage: obj._eval_derivative_matrix_lines(x) and returns: lines