def METHOD_NAME(self):
    """
    Create a poolset file with basic space validation. If CREATE arguments
    ware passed to parts, create parts files as well.
    """
    self._check_pools_size()
    required_size = self._get_required_size()
    free_space = self.ctx.get_free_space()
    if required_size > free_space:
        futils.fail('Not enough space available to create parts '
                    'files. There is {}, and poolset requires {}'
                    .format(free_space, required_size))
    for part in self.parts:
        part._process(self.ctx)
    for replica in self.replicas:
        for part in replica:
            part._process(self.ctx)
    self.options = list(set(self.options))
    poolsetpath = os.path.join(self.ctx.testdir, self.path)
    with open(poolsetpath, 'w') as poolset:
        print('PMEMPOOLSET', end='\n\n', file=poolset)
        for option in self.options:
            print('OPTION', option, end='\n\n', file=poolset)
        for part in self.parts:
            print(part, file=poolset)
        print(file=poolset)
        for replica in self.replicas:
            print("REPLICA", file=poolset)
            for part in replica:
                print(part, file=poolset)
            print(file=poolset)