def get_trim_footnote_ref_space(settings):
 if (settings.trim_footnote_reference_space is None):
  return (hasattr(settings, 'footnote_references') and (settings.footnote_references == 'superscript'))
 else:
  return settings.trim_footnote_reference_space

def get_trim_footnote_ref_space ( settings ) : if ( settings . trim_footnote_reference_space is None ) : return ( hasattr ( settings , 'footnote_references' ) and ( settings . footnote_references == 'superscript' ) ) else : return settings . trim_footnote_reference_space
return whether or not to trim footnote space .