code: def _load_member(
      dir_images,
      family_id,
      member_id,
      labels,
      face_indices,
      tags,
      kinship_map,
  ):
      samples = []
      num_members = labels.shape[0]
      member_id_int = _get_mid(member_id)
      name = _get_name(labels, member_id_int)
      gender = _get_gender(labels, member_id_int)
      imgs_list = os.listdir(dir_images)
      rels = _get_relationships(
          labels, member_id_int, num_members, family_id
      )
  
      for img in imgs_list:
          sample = fo.Sample(
              filepath=os.path.join(dir_images, img), tags=tags
          )
          picture, face = _get_picture_face(img)
          sample["family"] = family_id
          sample["member_id"] = member_id_int
          sample["member"] = member_id
          sample["name"] = name
          sample["gender"] = gender
          sample["picture"] = picture
          sample["face"] = face
  
          identifier = "%s/%s" % (family_id, member_id)
          sample["identifier"] = identifier
          sample["face_id"] = face_indices[identifier]
          face_indices[identifier] += 1
  
          sample["relationships"] = fo.Classifications(
              classifications=rels
          )
  
          kinships = []
          for pair_type, kin_identifiers in kinship_map.get(
              identifier, {}
          ).items():
              for kin_id in kin_identifiers:
                  kin_fid, kin_mid = kin_id.split("/")
                  kinships.append(
                      fo.Classification(
                          label=str(pair_type),
                          member_id=kin_mid,
                          family=kin_fid,
                      )
                  )
  
          sample["kinships"] = fo.Classifications(
              classifications=kinships
          )
          samples.append(sample)
  
      return samples
  
imports: import logging
  import os
  from collections import defaultdict
  import eta.core.utils
  import eta.core.web
  import pandas
  import fiftyone
  import fiftyone.core.utils
  import fiftyone.utils.data
  from fiftyone.core.expressions import ViewField
  from fiftyone.core.expressions import VALUE
label_desc: Use image node_id 4 for calling a global function with example usage: _load_member(dir_images, family_id, member_id, labels, face_indices, tags, kinship_map) and returns: samples