<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def pca_loadings(adata, components=None, show=None, save=None):
 """Rank genes according to contributions to PCs. Parameters adata : :class:`~anndata.AnnData` Annotated data matrix. components : str or list of integers, optional For example, ``'1,2,3'`` means ``[1, 2, 3]``, first, second, third principal component. show : bool, optional (default: `None`) Show the plot, do not return axis. save : `bool` or `str`, optional (default: `None`) If `True` or a `str`, save the figure. A string is appended to the default filename. Infer the filetype if ending on {'.pdf', '.png', '.svg'}. """

    if components is None: components = [1, 2, 3]
    elif isinstance(components, str): components = components.split(',')
    components = np.array(components) - 1
    ranking(adata, 'varm', 'PCs', indices=components)
    utils.savefig_or_show('pca_loadings', show=show, save=save)