'Construct a fake import item'

def import_item(self, person, email=None, sms=None):

    from s3.s3import import S3ImportItem
    def item(tablename, data):
        return Storage(id=None, method=None, tablename=tablename, data=data, components=[], METHOD=S3ImportItem.METHOD)
    import_item = item('pr_person', person)
    if email:
        import_item.components.append(item('pr_contact', Storage(contact_method='EMAIL', value=email)))
    if sms:
        import_item.components.append(item('pr_contact', Storage(contact_method='SMS', value=sms)))
    return import_item
