code: def get_metadata_for_nifti(in_file, bids_dir=None, validate=True):
      
      return _init_layout(in_file, bids_dir, validate).get_metadata(
          str(in_file))
docs: Fetch metadata for a given nifti file
  
      >>> metadata = get_metadata_for_nifti(
      ...     datadir / 'ds054' / 'sub-100185' / 'fmap' / 'sub-100185_phasediff.nii.gz',
      ...     validate=False)
      >>> metadata['Manufacturer']
      'SIEMENS'
  
      >>>