def METHOD_NAME(self, lief_binary):
    from sklearn.feature_extraction import FeatureHasher
    sections = lief_binary.sections
    sections_list = [{'name': sec.name,
                      'size': sec.size,
                      'virtual_size': sec.virtual_size,
                      'entropy': sec.entropy,
                      'characteristics': [str(characteristic) for characteristic in sec.characteristics_lists]} for
                     sec in sections]
    features = [
        len(sections_list),
        sum([1 for sec in sections_list if sec['size'] == 0]),
        sum([1 for sec in sections_list if sec['name'] == ""])]
    section_characteristics = ['SECTION_CHARACTERISTICS.CNT_CODE',
                               'SECTION_CHARACTERISTICS.CNT_INITIALIZED_DATA',
                               'SECTION_CHARACTERISTICS.MEM_DISCARDABLE',
                               'SECTION_CHARACTERISTICS.MEM_NOT_CACHED',
                               'SECTION_CHARACTERISTICS.MEM_NOT_PAGED',
                               'SECTION_CHARACTERISTICS.MEM_SHARED',
                               'SECTION_CHARACTERISTICS.MEM_EXECUTE',
                               'SECTION_CHARACTERISTICS.MEM_READ',
                               'SECTION_CHARACTERISTICS.MEM_WRITE']
    for characteristic in section_characteristics:
        features.append(sum([1 for sec in sections_list if characteristic in sec['characteristics']]))
    sizes = {sec['name']: sec['size'] for sec in sections_list}
    features.extend(FeatureHasher(20).transform([sizes]).toarray()[0])
    virtual_sizes = {sec['name']: sec['virtual_size'] for sec in sections_list}
    features.extend(FeatureHasher(20).transform([virtual_sizes]).toarray()[0])
    entropies = {sec['name']: sec['entropy'] for sec in sections_list}
    features.extend(FeatureHasher(20).transform([entropies]).toarray()[0])
    characteristics = [characteristic for sec in sections_list for characteristic in sec['characteristics']]
    features.extend(FeatureHasher(20, input_type='string').transform([characteristics]).toarray()[0])
    return features