def _set_branch_length_mode(self, branch_length_mode):
if branch_length_mode in ['<STR_LIT>', '<STR_LIT>', '<STR_LIT:input>']:<EOL><INDENT>self.branch_length_mode = branch_length_mode<EOL><DEDENT>elif self.aln:<EOL><INDENT>bl_dis = [n.branch_length for n in self.tree.find_clades() if n.up]<EOL>max_bl = np.max(bl_dis)<EOL>if max_bl><NUM_LIT:0.1>:<EOL><INDENT>bl_mode = '<STR_LIT:input>'<EOL><DEDENT>else:<EOL><INDENT>bl_mode = '<STR_LIT>'<EOL><DEDENT>self.logger("<STR_LIT>"%(max_bl, bl_mode),<NUM_LIT:1>)<EOL>self.branch_length_mode = bl_mode<EOL><DEDENT>else:<EOL><INDENT>self.branch_length_mode = '<STR_LIT:input>'<EOL><DEDENT>
if branch_length mode is not explicitly set, set according to
empirical branch length distribution in input tree

Parameters
----------

 branch_length_mode : str, 'input', 'joint', 'marginal'
    if the maximal branch length in the tree is longer than 0.05, this will
    default to 'input'. Otherwise set to 'joint'