def METHOD_NAME(metadata: Dict, source: Contribution):
    for sample in metadata:
        if type(sample["sample_accession"]) != str:
            logger.error(
                "The provided sample accession {} is not a string".format(
                    sample["sample_accession"]
                )
            )
            continue
        if type(sample["attributes"]) != list:
            # Don't print sample_attributes itself because it could be massive
            logger.error(
                "The provided attributes for sample {} is not a list".format(
                    sample["sample_accession"]
                )
            )
            continue
        import_sample_attributes(sample["sample_accession"], sample["attributes"], source)