class_docstr: An object with some value that can be observed.
  
  An object to which a `listener` can be attached to and be alerted about on
  an event happening.
  
  Attributes
  ----------
  listeners : list of listeners
      A list of listeners that the object will alert on events occurring.
  
  Methods
  -------
  attach(listener)
      Adds a listener to receive alerts.
  detach(listener)
      Removes a listener from receiving alerts.
class_docstr_tok: ["An","object","with","some","value","that","can","be","observed",".","An","object","to","which","a","`","listener","`","can","be","attached","to","and","be","alerted","about","on","an","event","happening",".","Attributes","--","--","--","--","--","listeners",":","list","of","listeners","A","list","of","listeners","that","the","object","will","alert","on","events","occurring",".","Methods","--","--","--","-","attach","(","listener",")","Adds","a","listener","to","receive","alerts",".","detach","(","listener",")","Removes","a","listener","from","receiving","alerts","."]
docstr: Adds a listener to receive alerts.
  
  Parameters
  ----------
  listener : a listener object
  
  Returns
  -------
  `Observable` :
      The observable being called.
docstr_tok: ["Adds","a","listener","to","receive","alerts",".","Parameters","--","--","--","--","--","listener",":","a","listener","object","Returns","--","--","--","-","`","Observable","`",":","The","observable","being","called","."]
code: def attach(self, listener) -> "Observable":
      """Adds a listener to receive alerts.
  
      Parameters
      ----------
      listener : a listener object
  
      Returns
      -------
      `Observable` :
          The observable being called.
      """
      self.listeners += [listener]
      return self
  
file_path: tensortrade/tensortrade/core/base.py
imports: import uuid
  from abc import ABCMeta
  from tensortrade.core.clock import Clock
label_desc: Use image node_id 2 for calling the Observable obj's underlying member method code with example usage: obj.attach(listener) and returns: self