Editor Scripting: How to add StaticMeshComponent to existing actor in level using Python/Blueprint/C++?

In the level editor in the Details panel there is a button “Add Component”. And you can add any component to an actor.

But how can you add a component (StaticMeshComponent) to actor with a Python or Blueprint Script or maybe c++?

Cant find anything in references. It looks like it should be implemented.