code: def calculate_max_leverage(self):
      if self.algorithm_leverages is None:
          return 0.0
      else:
          return max(self.algorithm_leverages)
  
file_path: catalyst/catalyst/finance/risk/period.py
imports: import functools
  import warnings
  import logbook
  from six import iteritems
  import numpy
  import pandas
  from .None import risk
  from .risk import check_entry
  from empyrical import alpha_beta_aligned, annual_volatility, downside_risk, information_ratio, sharpe_ratio, sortino_ratio
  from catalyst.patches.stats import max_drawdown, cum_returns
  from catalyst.constants import LOG_LEVEL
label_desc: Use image node_id 6 for calling the RiskMetricsPeriod obj's underlying member method code with example usage: obj.calculate_max_leverage() and returns: int, max