def get_shape_from_component(component, component_name='vtx'):
    """
    Given a component, returns the associated shape
    :param component: str
    :param component_name: str, component type ('vtx', 'e', 'f' or 'cv')
    :return: str
    """

    component_shape = None

    if component.find('.{}['.format(component_name)) > -1:
        split_selected = component.split('.{}['.format(component_name))
        if split_selected > 1:
            component_shape = split_selected[0]

    return component_shape