





'''simple docstring'''


def       A							(      _UpperCAmelCase   :				Any						,_UpperCAmelCase   :				str					)  ->				Any:


  '''simple docstring'''




  __lowerCAmelCase		:    int			     =  0
  for ele in arr:
    total_sum += product_sum(_lowerCAmelCase						,depth + 1					) if isinstance(_lowerCAmelCase						,_lowerCAmelCase					) else ele
  return total_sum * depth




def       A							(      _UpperCAmelCase   :				Union[str, Any]					)  ->				List[str]:


  '''simple docstring'''




  return product_sum(_lowerCAmelCase						,1					)


if __name__ == "__main__":
    import doctest

    doctest.testmod()










UpperCAmelCase :				Optional[int]							="""
# Diffusers installation
! pip install diffusers transformers datasets accelerate
# To install from source instead of the last release, comment the command above and uncomment the following one.
# ! pip install git+https://github.com/huggingface/diffusers.git
"""

UpperCAmelCase :				List[Any]							=[{"""type""": """code""", """content""": INSTALL_CONTENT}]
