class_docstr: Parameters
  ----------
  ttype
      Type of theano variable this list will contains, can be another list.
  depth
      Optionnal parameters, any value above 0 will create a nested list of
      this depth. (0-based)
class_docstr_tok: ["Parameters","--","--","--","--","--","ttype","Type","of","theano","variable","this","list","will","contains",",","can","be","another","list",".","depth","Optionnal","parameters",",","any","value","above","0","will","create","a","nested","list","of","this","depth",".","(","0-based",")"]
code: def may_share_memory(self, a, b):
      if a is b:
          return True
      # As a list contain other element, if a or b isn't a list, we
      # still need to check if that element is contained in the
      # other list.
      if not isinstance(a, list):
          a = [a]
      if not isinstance(b, list):
          b = [b]
      for idx1 in range(len(a)):
          for idx2 in range(len(b)):
              if self.ttype.may_share_memory(a[idx1], b[idx2]):
                  return True
  
file_path: Theano/theano/typed_list/type.py
imports: from __future__ import absolute_import, print_function, division
  from theano import gof
label_desc: Use image node_id 8 for calling the TypedListType obj's underlying member method code with example usage: obj.may_share_memory(a, b) and returns: True, True