def name2description(name_str):
    """ Gets the description of the layer contained in the lyp name field.
        It is not strictly necessary to have a description. If none there, it returns ''.

        Default format of the lyp name is
            layer/datatype - phidl_key - description
            or
            phidl_key - description

        Reassign for different layer naming conventions with::

            phidl.utilities.name2description = someOtherFunction(string)
    """
    if name_str is None:
        raise IOError('This layer has no name')
    components = name_str.split(' - ')
    description = ''
    if len(components) > 2:
        description = components[2][1:-1]
    return description
