def METHOD_NAME(self, metadata: dict) -> dict:
    """
    Normalize metadata to ensure it is within the size limit and doesn't contain complex objects.
    """
    result = {}
    current_size = 0
    for key, value in metadata.items():
        if isinstance(value, (str, int, float, bool)) or (isinstance(value, list) and all(isinstance(item, str) for item in value)):
            # Calculate the size of the key and value
            item_size = len(str(key)) + len(str(value))
            # Check if adding the item exceeds the size limit
            if self.max_metadata_size is None or current_size + item_size <= self.max_metadata_size:
                result[key] = value
                current_size += item_size
    return result