docstr: Register the number of shares we held at this dividend's ex date so
  that we can pay out the correct amount on the dividend's pay date.
docstr_tok: ["Register","the","number","of","shares","we","held","at","this","dividend","'s","ex","date","so","that","we","can","pay","out","the","correct","amount","on","the","dividend","'s","pay","date","."]
code: def earn_dividend(self, dividend):
      """
      Register the number of shares we held at this dividend's ex date so
      that we can pay out the correct amount on the dividend's pay date.
      """
      return {"amount": self.amount * dividend.amount}
  
file_path: zipline/zipline/finance/position.py
imports: from __future__ import division
  from math import copysign
  import numpy
  import logbook
  from zipline.assets import Future
  import zipline.protocol
label_desc: Use image node_id 4 for calling the Position obj's underlying member method code with example usage: obj.earn_dividend(dividend) and returns: dict